/* ==========================================================================
 * Component: Banner Slider (shared by homepage and WeTrans Social)
 * ========================================================================== */

@property --wt-slider-image-ratio {
    syntax: "<number>";
    inherits: true;
    initial-value: 1.777777778;
}

.wt-banner-slider {
    --wt-slider-image-width: 16;
    --wt-slider-image-height: 9;
    --wt-slider-image-ratio: calc(var(--wt-slider-image-width) / var(--wt-slider-image-height));
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.wt-banner-slider[hidden] {
    display: none;
}

.wt-banner-slider.is-dismissing {
    opacity: 0;
    pointer-events: none;
    transform: scale(.985);
    transition: opacity .18s ease, transform .18s ease;
}

.wt-banner-slider--loading {
    pointer-events: none;
    user-select: none;
}

.wt-banner-slider__close {
    position: absolute;
    z-index: 4;
    top: 11px;
    right: 11px;
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 50%;
    color: rgba(255, 255, 255, .92);
    background: rgba(24, 24, 27, .32);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .14);
    opacity: .76;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.wt-banner-slider__close:hover,
.wt-banner-slider__close:focus-visible {
    border-color: rgba(255, 255, 255, .68);
    color: #fff;
    background: rgba(24, 24, 27, .58);
    opacity: 1;
    transform: scale(1.04);
}

.wt-banner-slider__close svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}

.wt-banner-slider__viewport {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: var(--gray-100, #f4f4f5);
    box-shadow: 0 16px 38px rgba(39, 39, 42, .09);
    aspect-ratio: var(--wt-slider-image-ratio);
    touch-action: pan-y;
}

.wt-banner-slider__slides,
.wt-banner-slider__slide {
    position: absolute;
    inset: 0;
}

.wt-banner-slider__slide {
    opacity: 0;
    visibility: hidden;
    transform: translateX(12px);
    transition: opacity 260ms ease, transform 320ms ease, visibility 260ms;
}

.wt-banner-slider__slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.wt-banner-slider__link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

.wt-banner-slider__video-trigger {
    position: absolute;
    inset: 0;
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    border: 0;
    background: #18181b;
    color: inherit;
    cursor: pointer;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.wt-banner-slider__link img,
.wt-banner-slider__link video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.wt-banner-slider__video-trigger video {
    pointer-events: none;
}

.wt-slider-video-play {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    color: #fff;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: color .16s ease, transform .16s ease;
}

.wt-slider-video-play svg {
    width: 56px;
    height: 56px;
    margin-left: 2px;
    fill: currentColor;
    stroke: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5));
}

.wt-banner-slider__video-trigger:hover .wt-slider-video-play,
.wt-banner-slider__video-trigger:focus-visible .wt-slider-video-play {
    color: #ffe3f0;
    transform: translate(-50%, -50%) scale(1.06);
}

.wt-slider-video-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: fit-content;
    min-width: min(340px, calc(100vw - 24px));
    max-width: min(980px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    background: #0f0d12;
    color: #fff;
    box-shadow: 0 32px 84px rgba(0, 0, 0, .64), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}

.wt-slider-video-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: wt-slider-video-open .2s cubic-bezier(.16, 1, .3, 1) both;
}

.wt-slider-video-dialog::backdrop {
    background: rgba(10, 8, 13, .78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.wt-slider-video-dialog__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    background: #070609;
}

.wt-slider-video-dialog__video,
.wt-slider-video-dialog video {
    display: block;
    width: auto;
    max-width: min(980px, calc(100vw - 24px));
    max-height: min(calc(100vh - 116px), 760px);
    max-height: min(calc(100dvh - 116px), 760px);
    margin: 0 auto;
    object-fit: contain;
    background: #070609;
}

.wt-slider-video-dialog__close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background: rgba(15, 13, 18, .58);
    color: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.wt-slider-video-dialog__close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}

.wt-slider-video-dialog__close:hover,
.wt-slider-video-dialog__close:focus-visible {
    background: rgba(24, 21, 29, .86);
    border-color: rgba(255, 255, 255, .42);
    color: #fff;
    transform: scale(1.05);
}

.wt-slider-video-dialog__close:focus-visible {
    outline: 2px solid #f472b6;
    outline-offset: 2px;
}

.wt-slider-video-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #17141c 0%, #110f15 100%);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.wt-slider-video-dialog__footer[hidden] {
    display: none;
}

.wt-slider-video-dialog__dest {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: rgba(244, 238, 246, .72);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.wt-slider-video-dialog__dest svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .8;
}

.wt-slider-video-dialog__dest span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-slider-video-dialog__cta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(255, 168, 210, .28);
    border-radius: 999px;
    background: linear-gradient(135deg, #e11d74 0%, #c61162 100%);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.005em;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(225, 29, 116, .26);
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.wt-slider-video-dialog__cta svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wt-slider-video-dialog__cta:hover {
    background: linear-gradient(135deg, #ea277e 0%, #d11569 100%);
    border-color: rgba(255, 198, 226, .52);
    color: #fff;
    box-shadow: 0 8px 22px rgba(225, 29, 116, .38);
    transform: translateY(-1px);
}

.wt-slider-video-dialog__cta:focus-visible {
    outline: 2px solid #f9a8d4;
    outline-offset: 2px;
}

@keyframes wt-slider-video-open {
    from {
        opacity: 0;
        transform: scale(.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wt-banner-slider__controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100% - 16px);
    pointer-events: none;
    transform: translateX(-50%);
}

.wt-banner-slider__controls[hidden] {
    display: none;
}

.wt-banner-slider__arrow {
    position: static;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--gray-200, #e4e4e7);
    border-radius: 50%;
    background: var(--white, #fff);
    color: var(--gray-600, #52525b);
    cursor: pointer;
    pointer-events: auto;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.wt-banner-slider__arrow[hidden] {
    display: grid;
    visibility: hidden;
    pointer-events: none;
}

.wt-banner-slider__arrow:hover {
    border-color: var(--rose-200, #ffb0d4);
    background: var(--rose-50, #fff5f5);
    color: var(--fuchsia-500, #e0007a);
}

.wt-banner-slider__arrow svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wt-banner-slider__dots {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 34px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.wt-banner-slider__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: var(--gray-300, #d4d4d8);
    cursor: pointer;
    transition: width .18s ease, background .18s ease;
}

.wt-banner-slider__dot.is-active {
    width: 22px;
    border-radius: 4px;
    background: var(--fuchsia-500, #e0007a);
}

.wt-banner-slider button:focus-visible {
    outline: 2px solid var(--fuchsia-400, #f02d8a);
    outline-offset: 3px;
}

/* Deferred loading placeholder */
.wt-banner-slider__placeholder {
    background: linear-gradient(135deg, var(--gray-100, #f4f4f5) 0%, #f4ecf1 50%, var(--gray-100, #f4f4f5) 100%);
}

.wt-banner-slider__placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-110%);
    background: linear-gradient(
        105deg,
        transparent 18%,
        rgba(255, 255, 255, .72) 48%,
        rgba(255, 224, 239, .34) 58%,
        transparent 82%
    );
    animation: wt-banner-slider-shimmer 1.65s cubic-bezier(.4, 0, .2, 1) infinite;
}

.wt-banner-slider__controls--placeholder {
    opacity: .65;
}

.wt-banner-slider__placeholder-arrow {
    display: block;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid var(--gray-200, #e4e4e7);
    border-radius: 50%;
    background: rgba(255, 255, 255, .72);
}

.wt-banner-slider__controls--placeholder .wt-banner-slider__dot {
    pointer-events: none;
    background: var(--gray-300, #d4d4d8);
}

.wt-banner-slider__controls--placeholder .wt-banner-slider__dot.is-active {
    background: rgba(224, 0, 122, .32);
}

.wt-banner-slider--loaded .wt-banner-slider__viewport,
.wt-banner-slider--loaded .wt-banner-slider__controls,
.wt-banner-slider--loaded .wt-banner-slider__close {
    animation: wt-banner-slider-reveal .24s ease-out both;
}

@keyframes wt-banner-slider-shimmer {
    0% {
        transform: translateX(-110%);
    }

    100% {
        transform: translateX(110%);
    }
}

@keyframes wt-banner-slider-reveal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 640px) {
    main:has(.wt-banner-slider:not([hidden])) {
        padding-top: 8px;
    }

    .wt-slider-video-dialog {
        border-radius: 16px;
    }

    .wt-slider-video-dialog__close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }

    .wt-slider-video-dialog__footer {
        padding: 10px 12px;
        gap: 10px;
    }

    .wt-slider-video-dialog__dest {
        font-size: 12px;
    }

    .wt-slider-video-dialog__cta {
        min-height: 36px;
        padding: 0 14px;
        font-size: 13px;
    }

    .wt-banner-slider__close {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
    }

    .wt-banner-slider__arrow,
    .wt-banner-slider__placeholder-arrow {
        width: 26px;
        height: 26px;
    }

    .wt-banner-slider__arrow svg {
        width: 13px;
        height: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wt-banner-slider,
    .wt-banner-slider__close,
    .wt-banner-slider__slide,
    .wt-banner-slider__dot,
    .wt-slider-video-dialog__close,
    .wt-slider-video-dialog__cta {
        transition: none;
    }

    .wt-slider-video-dialog[open],
    .wt-banner-slider__placeholder::after,
    .wt-banner-slider--loaded .wt-banner-slider__viewport,
    .wt-banner-slider--loaded .wt-banner-slider__controls,
    .wt-banner-slider--loaded .wt-banner-slider__close {
        animation: none;
    }

    .wt-banner-slider__placeholder::after {
        display: none;
    }
}
