/*
ABRIO_SERVICE_CARD_LIGHTBOX_V1_2

Lightbox genérico para CMSServiceCard no enlazada.
Colores y tipografía usan variables administrables del sitio.
*/

body.cms-service-card-lightbox-open {
    overflow: hidden;
}

.cms-public-service-card--zoomable {
    cursor: zoom-in;
}

.cms-public-service-card--zoomable:focus-visible {
    outline: 3px solid var(--oasis-sapphire);
    outline-offset: 4px;
}

.cms-service-card-lightbox[hidden] {
    display: none;
}

.cms-service-card-lightbox {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: clamp(12px, 2vw, 28px);
    position: fixed;
    transition: opacity 0.18s ease;
    z-index: 12000;
}

.cms-service-card-lightbox.is-open {
    opacity: 1;
}

.cms-service-card-lightbox__backdrop {
    appearance: none;
    background:
        color-mix(
            in srgb,
            var(--oasis-navy) 92%,
            transparent
        );
    border: 0;
    cursor: zoom-out;
    inset: 0;
    padding: 0;
    position: absolute;
    width: 100%;
}

.cms-service-card-lightbox__dialog {
    display: flex;
    flex-direction: column;
    max-height: calc(100svh - 48px);
    max-width: min(1500px, calc(100vw - 48px));
    position: relative;
    width: auto;
    z-index: 1;
}

.cms-service-card-lightbox__media {
    align-items: center;
    display: flex;
    justify-content: center;
    max-height: min(82svh, 1000px);
    max-width: 100%;
    min-height: 0;
}

.cms-service-card-lightbox__media img {
    border-radius: clamp(12px, 1.4vw, 22px);
    box-shadow:
        0 28px 90px
        color-mix(
            in srgb,
            var(--oasis-navy) 60%,
            transparent
        );
    display: block;
    height: auto;
    max-height: min(82svh, 1000px);
    max-width: min(94vw, 1500px);
    object-fit: contain;
    width: auto;
}

.cms-service-card-lightbox__close {
    align-items: center;
    appearance: none;
    background-color: var(--oasis-white);
    border: 0;
    border-radius: 999px;
    color: var(--oasis-navy);
    cursor: pointer;
    display: flex;
    height: 46px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 12px;
    top: 12px;
    transition:
        transform 0.18s ease,
        background-color 0.18s ease;
    width: 46px;
    z-index: 3;
}

.cms-service-card-lightbox__close:hover {
    background-color: var(--oasis-sapphire);
    transform: scale(1.04);
}

.cms-service-card-lightbox__close svg {
    height: 22px;
    width: 22px;
}

.cms-service-card-lightbox__close:focus-visible {
    outline: 3px solid var(--oasis-sapphire);
    outline-offset: 3px;
}

.cms-service-card-lightbox__caption {
    color: var(--oasis-white);
    margin: 14px auto 0;
    max-width: 920px;
    padding: 0 12px;
    text-align: center;
}

.cms-service-card-lightbox__eyebrow {
    color: var(--oasis-sapphire);
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cms-service-card-lightbox__title {
    color: var(--oasis-white);
    font-family:
        var(--oasis-heading-font),
        var(--oasis-body-font),
        sans-serif;
    font-size: clamp(20px, 2vw, 32px);
    line-height: 1.12;
    margin: 5px 0 0;
}

.cms-service-card-lightbox__description {
    color:
        color-mix(
            in srgb,
            var(--oasis-white) 78%,
            transparent
        );
    font-size: 14px;
    line-height: 1.55;
    margin: 7px 0 0;
}

@media (max-width: 767px) {
    .cms-service-card-lightbox {
        padding: 10px;
    }

    .cms-service-card-lightbox__dialog {
        max-height: calc(100svh - 20px);
        max-width: calc(100vw - 20px);
        width: 100%;
    }

    .cms-service-card-lightbox__media {
        max-height: 78svh;
        width: 100%;
    }

    .cms-service-card-lightbox__media img {
        max-height: 78svh;
        max-width: 100%;
    }

    .cms-service-card-lightbox__close {
        height: 44px;
        right: 10px;
        top: 10px;
        width: 44px;
    }

    .cms-service-card-lightbox__caption {
        margin-top: 12px;
    }

    .cms-service-card-lightbox__description {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cms-service-card-lightbox,
    .cms-service-card-lightbox__close {
        transition: none;
    }
}
