.wcawvc-relations-widget,
.wcawvc-relations-widget * {
    box-sizing: border-box;
}

.wcawvc-relations-widget {
    --wcawvc-relations-gap: 10px;
    width: 100%;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.wcawvc-relations-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding-top: 10px;
    padding-bottom: 10px;
    position: relative;
    z-index: 1;
}

.wcawvc-relations-scroll::-webkit-scrollbar {
    height: 6px;
}

.wcawvc-relations-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 999px;
}

.wcawvc-relations-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.wcawvc-relations-track {
    display: flex;
    gap: var(--wcawvc-relations-gap);
    width: max-content;
    min-width: 100%;
    align-items: flex-start;
    padding-top: 4px;
    position: relative;
    overflow: visible;
}

.wcawvc-relations-entry {
    position: relative;
    flex: 0 0 auto;
    overflow: visible;
    z-index: 1;
}

.wcawvc-relations-entry:hover,
.wcawvc-relations-entry:focus-within {
    z-index: 999;
}

.wcawvc-relations-item {
    position: relative;
    display: block;
    width: calc((100% - (var(--wcawvc-relations-gap) * 4)) / 5);
    min-width: calc((100% - (var(--wcawvc-relations-gap) * 4)) / 5);
    border: 1px solid #d8d8d8;
    background: #ffffff;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
    z-index: 1;
}

.wcawvc-relations-item:hover,
.wcawvc-relations-entry:hover .wcawvc-relations-item,
.wcawvc-relations-entry:focus-within .wcawvc-relations-item {
    transform: translateY(-6px);
    z-index: 3;
}

.wcawvc-relations-item.is-active {
    border-color: #7a1111;
}

.wcawvc-relations-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
}

.wcawvc-relations-tooltip {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: #7a1111;
    color: #ffffff;
    padding: 8px 14px;
    white-space: nowrap;
    z-index: 9999;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    transform: translateY(6px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.wcawvc-relations-widget.tooltip-top .wcawvc-relations-tooltip {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(-6px);
}

.wcawvc-relations-entry:hover .wcawvc-relations-tooltip,
.wcawvc-relations-entry:focus-within .wcawvc-relations-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wcawvc-relations-widget.tooltip-top .wcawvc-relations-entry:hover .wcawvc-relations-tooltip,
.wcawvc-relations-widget.tooltip-top .wcawvc-relations-entry:focus-within .wcawvc-relations-tooltip {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .wcawvc-relations-scroll {
        padding-top: 8px;
        padding-bottom: 15px;
    }
}