/* Safe Slideshow — self-contained styles, no external dependencies */

.safeslideshow {
    position: relative;
    width: 100%;
    height: var(--sfsl-height, 480px);
    overflow: hidden;
    border-radius: 6px;
    background: #101010;
    box-sizing: border-box;
    isolation: isolate;
}

.safeslideshow * { box-sizing: border-box; }

.safeslideshow__viewport {
    position: absolute;
    inset: 0;
    perspective: 1400px;
}

.safeslideshow__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: none;
    filter: none;
    transition:
        opacity var(--sfsl-speed, 700ms) ease-in-out,
        transform var(--sfsl-speed, 700ms) ease-in-out,
        filter var(--sfsl-speed, 700ms) ease-in-out;
}

.safeslideshow__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transform: none;
    filter: none;
}

.safeslideshow__bg {
    position: absolute;
    inset: 0;
    background-color: #222;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.0001);
}

.safeslideshow__slide--enter-right   { transform: translateX(6%);  z-index: 3; }
.safeslideshow__slide--enter-left    { transform: translateX(-6%); z-index: 3; }
.safeslideshow__slide--enter-down    { transform: translateY(6%);  z-index: 3; }
.safeslideshow__slide--enter-up      { transform: translateY(-6%); z-index: 3; }
.safeslideshow__slide--enter-zoom    { transform: scale(1.12); z-index: 3; }
.safeslideshow__slide--enter-flip    { transform: rotateY(8deg) scale(1.04); z-index: 3; }
.safeslideshow__slide--enter-blur    { filter: blur(14px); z-index: 3; }

.safeslideshow__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, calc(var(--sfsl-overlay, 0.35) + 0.15)) 0%,
        rgba(0, 0, 0, var(--sfsl-overlay, 0.35)) 55%,
        rgba(0, 0, 0, calc(var(--sfsl-overlay, 0.35) * 0.55)) 100%
    );
}

.safeslideshow__inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.safeslideshow__content {
    color: #fff;
    padding: 2.5rem 2rem;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.safeslideshow__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.85rem;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.safeslideshow__text {
    font-size: 1.1rem;
    line-height: 1.55;
    margin: 0 0 1.6rem;
    color: #f4f4f4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.safeslideshow__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.9rem;
    border-radius: 999px;
    background: #2f7f8c;
    color: #fff !important;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none !important;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    outline: none;
}

.safeslideshow__btn:hover,
.safeslideshow__btn:focus {
    background: #256a75;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    color: #fff !important;
    outline: none;
}

.safeslideshow__btn:active { transform: translateY(0); }

/*
 * Prev/Next arrows — BASE (shared by both styles below).
 * No browser focus ring/box-shadow ever, on any state.
 */
.safeslideshow__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    border: none;
    outline: none;
    box-shadow: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.safeslideshow__arrow:focus,
.safeslideshow__arrow:focus-visible,
.safeslideshow__arrow:active {
    outline: none;
    box-shadow: none;
}

.safeslideshow__arrow--prev { left: 16px; }
.safeslideshow__arrow--next { right: 16px; }
.safeslideshow__arrow svg { display: block; outline: none; }

/*
 * "plain" style (default): NO circle/oval background at all — just the
 * bare chevron icon with a drop-shadow so it stays visible over any photo.
 */
.safeslideshow__arrow--plain {
    width: 32px;
    height: 32px;
    background: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
    opacity: 0.85;
}

.safeslideshow__arrow--plain:hover,
.safeslideshow__arrow--plain:focus-visible {
    opacity: 1;
    transform: translateY(-50%) scale(1.15);
}

.safeslideshow__arrow--plain:active {
    transform: translateY(-50%) scale(0.95);
}

/*
 * "circle" style (optional, selectable in module settings): a soft
 * translucent disc behind the chevron.
 */
.safeslideshow__arrow--circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.32);
}

.safeslideshow__arrow--circle:hover,
.safeslideshow__arrow--circle:focus-visible,
.safeslideshow__arrow--circle:active {
    background: rgba(0, 0, 0, 0.55);
}

.safeslideshow__arrow--circle:active {
    transform: translateY(-50%) scale(0.92);
}

.safeslideshow__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 4;
    display: flex;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
}

.safeslideshow__dot {
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.25);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
    outline: none;
    transition: transform 0.2s ease, background-color 0.2s ease, width 0.25s ease, border-radius 0.25s ease;
}

.safeslideshow__dot:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: scale(1.2);
}

.safeslideshow__dot.is-active {
    background: #ffffff;
    width: 30px;
    border-radius: 8px;
    transform: none;
}

.safeslideshow__dot:focus,
.safeslideshow__dot:focus-visible {
    outline: none;
    box-shadow: none;
}

@media (max-width: 991px) {
    .safeslideshow__content { padding: 2rem 1.75rem; max-width: 560px; }
    .safeslideshow__title { font-size: 1.65rem; }
    .safeslideshow__text { font-size: 1rem; }
}

@media (max-width: 767px) {
    .safeslideshow {
        height: var(--sfsl-height-mobile, 320px);
        border-radius: 4px;
    }

    .safeslideshow__content { max-width: 100%; width: 100%; padding: 1.25rem 1.25rem; }
    .safeslideshow__title { font-size: 1.2rem; margin-bottom: 0.5rem; }

    .safeslideshow__text {
        font-size: 0.88rem;
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .safeslideshow__btn { padding: 0.6rem 1.4rem; font-size: 0.9rem; }

    .safeslideshow__arrow--plain { width: 26px; height: 26px; }
    .safeslideshow__arrow--circle { width: 34px; height: 34px; }
    .safeslideshow__arrow--prev { left: 8px; }
    .safeslideshow__arrow--next { right: 8px; }

    .safeslideshow__dots { bottom: 10px; gap: 7px; }
    .safeslideshow__dot { width: 8px; height: 8px; }
    .safeslideshow__dot.is-active { width: 20px; border-radius: 6px; }
}

@media (max-width: 767px) {
    .safeslideshow--fix-top-gap { margin-top: 0 !important; }

    .promo:has(> .safeslideshow--fix-top-gap),
    #promo:has(> .safeslideshow--fix-top-gap),
    .jsn-promo:has(> .safeslideshow--fix-top-gap),
    [class*="promo"]:has(> .safeslideshow--fix-top-gap),
    [id*="promo"]:has(> .safeslideshow--fix-top-gap) {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}
