/* ============================================================
   Menu Popup Modal
   Carousel of promotional slides shown on menu page load
   ============================================================ */

/* Modal shell --------------------------------------------------- */

.menu-popup-modal .modal-dialog {
    max-width: 42rem;
}

.menu-popup-content {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 0;
}

/* Close button sits above all content in top-right corner */
.menu-popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 0.5rem;
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.15);
    opacity: 1;
}

.menu-popup-close:hover {
    background-color: #fff;
    opacity: 1;
}

/* Carousel wrapper --------------------------------------------- */

.menu-popup-carousel {
    /* Fixed modal height with internal scroll per slide */
    height: 32rem;
    max-height: 85vh;
}

.menu-popup-carousel .carousel-inner,
.menu-popup-carousel .carousel-item {
    height: 100%;
}

/* Slide body --------------------------------------------------- */

.menu-popup-slide {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    /* Leave room for indicators at bottom when multi */
    padding: 2rem 1.5rem;
}

.menu-popup-slide__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Edge-to-edge: single image-only slide gets no padding */
.menu-popup-slide--edge {
    padding: 0;
}

.menu-popup-slide--edge .menu-popup-slide__body {
    gap: 0;
    height: 100%;
}

.menu-popup-slide--edge .menu-popup-row--image {
    height: 100%;
}

.menu-popup-slide--edge .menu-popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Rows --------------------------------------------------------- */

.menu-popup-row {
    width: 100%;
}

.menu-popup-row--image {
    text-align: center;
}

.menu-popup-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
    margin: 0 auto;
}

.menu-popup-heading {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.menu-popup-row--heading {
    text-align: center;
}

.menu-popup-text {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.menu-popup-row--text {
    text-align: center;
}

.menu-popup-row--cta {
    text-align: center;
    padding-top: 0.5rem;
}

.menu-popup-row--cta .btn {
    min-width: 10rem;
    padding: 0.5rem 1.5rem;
}

/* Offer cards -------------------------------------------------- */

.menu-popup-offer-card {
    background-color: #f7f7f5;
    min-height: 4.25rem;
    transition: transform 0.15s ease;
}

.menu-popup-offer-card:hover {
    transform: translateY(-0.0625rem);
}

/* Carousel chrome ---------------------------------------------- */

.menu-popup-indicators {
    bottom: 0.5rem;
    margin-bottom: 0.25rem;
    z-index: 5;
}

.menu-popup-indicators [data-bs-target] {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
    border: 0;
    margin: 0 0.25rem;
    opacity: 1;
}

.menu-popup-indicators .active {
    background-color: rgba(0, 0, 0, 0.8);
}

.menu-popup-control {
    width: 3rem;
    opacity: 0.6;
}

.menu-popup-control:hover {
    opacity: 1;
}

.menu-popup-control .carousel-control-prev-icon,
.menu-popup-control .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    padding: 1rem;
    background-size: 1rem;
}

/* Edge-to-edge slide needs lighter indicators over image */
.menu-popup-carousel:has(.carousel-item.active .menu-popup-slide--edge) .menu-popup-indicators [data-bs-target] {
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.5);
}

.menu-popup-carousel:has(.carousel-item.active .menu-popup-slide--edge) .menu-popup-indicators .active {
    background-color: rgba(255, 255, 255, 1);
}

/* Mobile adjustments ------------------------------------------- */

@media (max-width: 48rem) {
    .menu-popup-modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .menu-popup-carousel {
        height: 28rem;
    }

    .menu-popup-slide {
        padding: 1.5rem 1rem;
    }

    .menu-popup-control {
        width: 2.5rem;
    }

    .menu-popup-heading {
        font-size: 1.125rem;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .menu-popup-carousel .carousel-item {
        transition: none;
    }
}