.site-popup .modal-dialog {
    width: min(780px, calc(100vw - 40px));
    max-width: none;
    min-height: calc(100% - 2rem);
    margin: 1rem auto;
}

.site-popup.fade .modal-dialog {
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-popup.show .modal-dialog {
    transform: none;
}

.site-popup .modal-content {
    position: relative;
    width: 100%;
    max-height: calc(100dvh - 2rem);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: #241d19;
    box-shadow: 0 18px 55px #30231430;
}

.site-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 50%;
    background: #fff;
    color: #594638;
    font: 24px/1 sans-serif;
    z-index: 3;
}

.site-popup-launcher {
    position: fixed;
    left: 20px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 14px 0 11px;
    gap: 8px;
    border: 1px solid rgba(154, 116, 73, 0.38);
    border-radius: 999px;
    background: #f7efe3;
    color: #80613f;
    box-shadow: 0 2px 10px rgba(52, 36, 20, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    line-height: 1;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
    z-index: 1036;
}

.site-popup-launcher-icon {
    display: block;
    width: 23px;
    height: 23px;
    flex: none;
}

.site-popup-launcher-label {
    font-family: var(--font-ui, inherit);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.site-popup-launcher-label-mobile { display: none; }

.site-popup-launcher:hover {
    transform: translateY(-1px) scale(1.02);
    background: #fff8ed;
    box-shadow: 0 4px 12px rgba(52, 36, 20, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.site-popup-launcher[hidden] { display: none; }

.site-popup-close:focus-visible,
.site-popup-launcher:focus-visible {
    outline: 3px solid var(--brand-primary, #765641);
    outline-offset: 3px;
}

@media (max-width: 767.98px) {
    .site-popup .modal-dialog {
        width: 92vw;
        min-height: calc(100% - 1.5rem);
        margin: .75rem auto;
    }

    .site-popup .modal-content {
        max-height: calc(100dvh - 1.5rem);
    }

    .site-popup-launcher {
        left: 12px;
        bottom: calc(96px + env(safe-area-inset-bottom));
        min-height: 42px;
        padding: 0 11px 0 9px;
        gap: 6px;
    }

    .site-popup-launcher-icon { width: 20px; height: 20px; }
    .site-popup-launcher-label { font-size: 11px; }
    .site-popup-launcher-label-desktop { display: none; }
    .site-popup-launcher-label-mobile { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
    .site-popup-launcher {
        transition: none;
    }

    .site-popup-launcher:hover {
        transform: none;
    }
}

.site-popup-slide { position: relative; text-align: center; }
.site-popup-slide[hidden] { display: none; }
.site-popup-slide::after { position: absolute; inset: auto 0 0; z-index: 2; height: 36%; background: linear-gradient(transparent, rgba(18, 14, 12, .42)); content: ''; pointer-events: none; }
.site-popup-media { position: relative; display: grid; place-items: center; max-height: calc(100dvh - 2rem); overflow: hidden; }
.site-popup-media > img:not(.site-popup-video-fallback) { display: block; width: 100%; height: auto; max-height: calc(100dvh - 2rem); object-fit: cover; }
.site-popup-media > video { position: relative; z-index: 1; display: block; width: 100%; max-height: calc(100dvh - 2rem); aspect-ratio: 16 / 9; object-fit: cover; }
.site-popup-video-fallback { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.site-popup-media > video:not(.site-popup-video-playing) { opacity: 0; }
.site-popup-actions { position: absolute; right: 12px; bottom: 20px; left: 12px; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 12px; }
.site-popup-multiple .site-popup-actions { bottom: 54px; }
.site-popup-primary { width: auto; min-width: 150px; max-width: 45%; padding: 9px 20px; overflow-wrap: anywhere; }
.site-popup-details { display: inline-block; min-width: 145px; max-width: 45%; padding: 8px 18px; border: 1px solid rgba(255, 255, 255, .82); border-radius: 8px; background: rgba(30, 23, 19, .42); color: #fff; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.site-popup-details:hover { background: rgba(30, 23, 19, .65); color: #fff; }
.site-popup-navigation { position: absolute; right: 0; bottom: 12px; left: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 16px; }
.site-popup-navigation > button { width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; background: rgba(30, 23, 19, .32); color: #fff; font-size: 24px; line-height: 1; }
.site-popup-dots { display: flex; gap: 8px; max-width: 185px; overflow-x: auto; padding: 4px; }
.site-popup-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.site-popup-dots button[aria-current="true"] { background: #fff; }
.site-popup button:focus-visible, .site-popup a:focus-visible { outline: 3px solid #967450; outline-offset: 3px; }

@media (max-width: 767.98px) {
    .site-popup-media {
        height: min(74vw, 58dvh);
    }

    .site-popup-media > img:not(.site-popup-video-fallback),
    .site-popup-media > video {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
    }

    .site-popup-actions {
        gap: 8px;
    }

    .site-popup-primary,
    .site-popup-details {
        min-width: 0;
        max-width: calc(50% - 4px);
        padding: 9px 12px;
    }
}
