/*
 * POP C Live Menu
 * Preserve the ORIGINAL menu card design and hover.
 *
 * Desktop:
 * - Original card normally
 * - Availability/order controls appear on hover
 *
 * Touch/mobile:
 * - Availability/order controls remain visible
 */


/* ----------------------------------------------------------
   LIVE STATUS — no changes to original card structure
   ---------------------------------------------------------- */

.popc-live-order {
    position: relative;
    z-index: 5;
    margin-top: 12px;
}

.popc-live-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.popc-live-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 9px;
    border-radius: 999px;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;

    white-space: nowrap;
}

.popc-live-badge.trailer {
    background: rgba(255,255,255,.92);
    color: #222;
    border: 1px solid rgba(255,255,255,.7);
}

.popc-live-badge.available {
    background: #e8f7ed;
    color: #176b38;
    border: 1px solid #c9e9d4;
}

.popc-live-badge.unavailable {
    background: #fff1df;
    color: #914e00;
    border: 1px solid #efd1aa;
}

.popc-live-next {
    display: block;
    margin: 0 0 10px;

    color: #68707a;
    font-size: 12px;
    line-height: 1.4;
}


/* ----------------------------------------------------------
   ORDER ONLINE BUTTON
   ---------------------------------------------------------- */

.popc-live-order .popc-order-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-width: 120px;
    padding: 9px 17px !important;

    border-radius: 999px !important;
    border: 1px solid #ffcc00 !important;

    background: #ffcc00 !important;
    color: #111 !important;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;

    position: relative;
    z-index: 10;
}

.popc-live-order .popc-order-button *,
.popc-live-order .popc-order-button:hover *,
.popc-live-order .popc-order-button:focus * {
    color: #111 !important;
    text-shadow: none !important;
}

.popc-live-order .popc-order-button:hover,
.popc-live-order .popc-order-button:focus {
    background: #f2c200 !important;
    border-color: #f2c200 !important;
    color: #000 !important;
}


/* Disabled */
.popc-live-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 17px;
    min-width: 120px;

    border: 1px solid #d9dde2;
    border-radius: 999px;

    background: #f1f3f5;
    color: #69707d;

    font-size: 13px;
    font-weight: 700;
}


/* ==========================================================
   DESKTOP — USE ORIGINAL HOVER
   ========================================================== */

@media (hover: hover) and (pointer: fine) {

    /*
     * Hide the extra availability information normally.
     * This keeps the ORIGINAL menu card appearance.
     */
    .menu_card .popc-live-order {
        max-height: 0;
        margin-top: 0;

        overflow: hidden;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(8px);

        transition:
            opacity .25s ease,
            transform .25s ease,
            max-height .3s ease,
            margin .3s ease;
    }


    /*
     * Reveal it as part of the original hover experience.
     */
    .menu_card:hover .popc-live-order {
        max-height: 150px;
        margin-top: 12px;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);
    }


    /*
     * Original theme already turns title/description white.
     * Make next-availability text white too.
     */
    .menu_card:hover .popc-live-next {
        color: rgba(255,255,255,.88) !important;
    }


    /*
     * Ensure content remains over the dark hover image.
     */
    .menu_card .bottom_content {
        z-index: 3 !important;
    }

    .menu_card .hover_content {
        z-index: 1;
        pointer-events: none;
    }
}


/* ==========================================================
   MOBILE / TOUCH
   There is no true hover, so keep ordering visible.
   ========================================================== */

@media (hover: none), (max-width: 767px) {

    .menu_card .popc-live-order {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        margin-top: 10px;
    }

    /*
     * Give bottom content enough room for status/button.
     * Original desktop card is 510px.
     */
    .menu_card .normal_content {
        height: 590px;
    }

    .menu_card .popc-order-button,
    .popc-live-disabled {
        min-width: 110px;
        padding: 8px 15px !important;
        font-size: 12px;
    }
}


/* ==========================================================
   DEFAULT DESKTOP CARD
   Keep Order Online button visible before hover.
   Status details still appear only on hover.
   ========================================================== */

@media (hover: hover) and (pointer: fine) {

    /* Allow the live-order area to exist on the normal card */
    .menu_card .popc-live-order {
        max-height: 48px;
        margin-top: 10px;

        overflow: visible;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: none;
    }

    /* Hide status information until hover */
    .menu_card:not(:hover) .popc-live-badges,
    .menu_card:not(:hover) .popc-live-next {
        display: none !important;
    }

    /* Keep Order Online button visible */
    .menu_card:not(:hover) .popc-order-button {
        display: inline-flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Hover: restore complete status area */
    .menu_card:hover .popc-live-order {
        max-height: 150px;
        margin-top: 12px;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);
    }

    .menu_card:hover .popc-live-badges {
        display: flex !important;
    }

    .menu_card:hover .popc-live-next {
        display: block !important;
    }
}


/* ==========================================================
   ADD BREATHING ROOM BETWEEN IMAGE AND DEFAULT CARD CONTENT
   ========================================================== */

@media (min-width: 768px) {
    .menu_card .normal_content {
        height: 590px;
    }
}


/* ==========================================================
   POP C - DETAILED DEFAULT AVAILABILITY
   ========================================================== */

@media (hover: hover) and (pointer: fine) {

    /*
     * More room because default card now contains:
     * title + description + badges + message + action
     */
    .menu_card[data-menu-slug] .normal_content {
        height: 590px;
    }


    /*
     * Show the full status area on the normal/default card.
     */
    .menu_card[data-menu-slug] .popc-live-order {
        max-height: 175px;
        margin-top: 14px;
        padding-top: 12px;

        border-top: 1px solid #eceff2;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: none;
        overflow: visible;
    }


    /*
     * We previously hid these until hover.
     * Now show them on the default card too.
     */
    .menu_card[data-menu-slug]:not(:hover) .popc-live-badges {
        display: flex !important;
    }

    .menu_card[data-menu-slug]:not(:hover) .popc-live-next {
        display: block !important;

        color: #747b84 !important;
        font-size: 12px;
        line-height: 1.5;

        margin: 0 0 12px;
    }


    /*
     * Give hover version a subtle separator too.
     */
    .menu_card[data-menu-slug]:hover .popc-live-order {
        max-height: 180px;
        padding-top: 12px;

        border-top: 1px solid rgba(255,255,255,.22);
    }

    .menu_card[data-menu-slug]:hover .popc-live-next {
        color: rgba(255,255,255,.82) !important;
    }
}


/* ==========================================================
   UNAVAILABLE ACTION
   Don't repeat "Not Available" twice.
   ========================================================== */

.popc-live-disabled {
    font-size: 0 !important;
}

.popc-live-disabled::after {
    content: "Check Back Soon";

    font-size: 13px;
    font-weight: 700;
}


/* Make disabled action look intentionally informational */
.popc-live-disabled {
    background: #f2f4f7 !important;
    border: 1px solid #d8dde3 !important;
    color: #626a73 !important;

    padding: 9px 17px !important;
}

.popc-live-disabled::after {
    color: #626a73;
}


/* Hover version */
.menu_card:hover .popc-live-disabled {
    background: rgba(255,255,255,.92) !important;
    border-color: rgba(255,255,255,.75) !important;
}

.menu_card:hover .popc-live-disabled::after {
    color: #333;
}


/* ==========================================================
   MOBILE
   Keep full status visible since there is no reliable hover.
   ========================================================== */

@media (hover: none), (max-width: 767px) {

    .menu_card[data-menu-slug] .normal_content {
        height: 610px;
    }

    .menu_card[data-menu-slug] .popc-live-order {
        padding-top: 12px;
        border-top: 1px solid #eceff2;
    }
}

/* Keep menu text safely below image */
.menu_card[data-menu-slug] .bottom_content {
    margin-top: 40px !important;
}

