/**
 * Hamburger sidebar menu: drawer, "My Orders" mobile-entry modal,
 * Your Orders results list, and Order Detail full-page popups.
 * Paired with assets/js/menu-sidebar.js.
 */

/* ===== Hamburger button (mirrors hero-call-btn, opposite corner) =====
   Uses !important + parent-scoped specificity because a theme's generic
   `button` reset rules can otherwise override border-radius/padding/
   flex-centering on a plain single-class selector, leaving a blank
   square with the icon squashed/hidden instead of a round button. */
.hero-header .hero-menu-btn {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    z-index: 5 !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.95) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #111 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
}
.hero-header .hero-menu-btn svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    flex-shrink: 0 !important;
}

/* ===== Sidebar drawer ===== */
.tez-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9990;
}
.tez-sidebar-overlay.tez-open { opacity: 1; pointer-events: auto; }

.tez-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(320px, 86vw);
    background: #fff;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    z-index: 9991;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.tez-sidebar.tez-open { transform: translateX(0); }

.tez-sidebar .tez-sidebar-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 5 !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #222 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
.tez-sidebar .tez-sidebar-close svg {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
}

/* ===== Cream card: header + My Orders + socials + love card ===== */
.tez-sidebar-card {
    position: relative;
    background: radial-gradient(circle at 18% 0%, #fbdec4 0%, #fdeddc 30%, #fffdfb 65%);
}

.tez-sidebar-header {
    padding: 30px 20px 18px;
    text-align: center;
}
.tez-sidebar-logo-wrap {
    width: 72px; height: 72px;
    min-width: 72px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    overflow: hidden;
}
.tez-sidebar-logo {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.tez-sidebar-header-text { }
.tez-sidebar-welcome-label { font-size: 13px; color: #8a7a6f; font-weight: 600; }
.tez-sidebar-name { margin-top: 2px; font-size: 22px; font-weight: 800; color: #1a1a1a; line-height: 1.25; }
.tez-sidebar-address { margin-top: 8px; font-size: 12.5px; color: #8a8a8a; line-height: 1.4; }

.tez-sidebar-body { padding: 4px 14px 18px; }

/* My Orders highlight card */
.tez-sidebar-orders-card {
    display: flex !important;
    align-items: center !important;
    gap: 13px !important;
    width: 100% !important;
    padding: 14px 14px !important;
    margin: 0 0 6px !important;
    background: rgba(255,255,255,0.65) !important;
    border: none !important;
    border-radius: 16px !important;
    text-align: left !important;
    cursor: pointer !important;
    box-shadow: none !important;
    font-family: inherit !important;
    height: auto !important;
    text-decoration: none !important;
}
.tez-sidebar-orders-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    border-radius: 50% !important;
    background: var(--tezmenu-primary, #f4913f) !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12) !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.tez-sidebar-orders-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}
.tez-sidebar-card-text {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
}
.tez-sidebar-card-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}
.tez-sidebar-card-sub {
    font-size: 12px !important;
    color: #8a8a8a !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}
.tez-sidebar-orders-card .tez-sidebar-row-chevron {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    flex-shrink: 0 !important;
    color: #b0b0b0 !important;
}

.tez-sidebar-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 6px 4px; }

.tez-sidebar-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 13px 8px;
    background: none;
    border: none;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.tez-sidebar-row:active { background: rgba(255,255,255,0.5); }
.tez-sidebar-row-icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    min-width: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.14);
    border: 2px solid #fff;
}
.tez-sidebar-row-icon svg { width: 19px; height: 19px; }
.tez-icon-instagram { background: radial-gradient(circle at 30% 110%, #ffdb73 0%, #ee2a7b 45%, #6228d7 100%); }
.tez-icon-facebook  { background: #1877f2; }
.tez-icon-youtube   { background: #ff0000; }
.tez-icon-google    { background: #fff; padding: 8px; box-sizing: border-box; }
.tez-sidebar-row-text { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tez-sidebar-row-label { font-size: 14px; font-weight: 700; color: #222; }
.tez-sidebar-row-sub { font-size: 11.5px; color: #999; }
.tez-sidebar-row-chevron { width: 16px; height: 16px; color: #ccc; flex-shrink: 0; }

.tez-sidebar-socials { display: flex; flex-direction: column; }
.tez-sidebar-socials .tez-sidebar-row { border-bottom: 1px solid rgba(0,0,0,0.07); }
.tez-sidebar-socials .tez-sidebar-row:last-child { border-bottom: none; }

/* Love our food / review card */
.tez-sidebar-love-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 14px;
    background: #e8f6ee;
    border-radius: 16px;
}
.tez-sidebar-love-icon {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #d3efe0;
    flex-shrink: 0;
}
.tez-sidebar-love-icon svg { width: 18px; height: 18px; }
.tez-sidebar-love-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tez-sidebar-love-title { font-size: 13.5px; font-weight: 700; color: #1a1a1a; }
.tez-sidebar-love-sub { font-size: 11px; color: #6b8a78; }
.tez-sidebar-love-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    background: #15803d;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 13px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
}
.tez-sidebar-love-btn svg { width: 12px; height: 12px; }

/* Scalloped edge separating the cream card from the footer */
.tez-sidebar-scallop {
    height: 12px;
    background:
        radial-gradient(circle at 8px 0, transparent 8px, #fffdfb 8.5px) 0 0 / 16px 12px repeat-x;
}

.tez-sidebar-footer {
    padding: 16px 20px 26px;
    text-align: center;
}
.tez-sidebar-footer-heart { font-size: 18px; line-height: 1; margin-bottom: 6px; }
.tez-sidebar-footer-thanks { font-size: 13px; color: #555; font-weight: 600; }
.tez-sidebar-footer-powered { margin-top: 10px; font-size: 11.5px; color: #aaa; font-weight: 600; }
.tez-sidebar-footer-powered span { color: #15803d; font-weight: 800; }

/* ===== My Orders: mobile-entry modal ===== */
.tez-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 9995;
}
.tez-modal-overlay.tez-open { opacity: 1; pointer-events: auto; }
.tez-modal-box {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 340px;
    border-radius: 18px;
    padding: 24px 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    transform: scale(.94);
    transition: transform .2s ease;
}
.tez-modal-overlay.tez-open .tez-modal-box { transform: scale(1); }
.tez-modal-box .tez-modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 2 !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #f2f2f2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #555 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
}
.tez-modal-box .tez-modal-close svg {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
}
.tez-modal-title { font-size: 15.5px; font-weight: 700; color: #111; text-align: center; margin-bottom: 16px; }
.tez-mobile-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}
.tez-mobile-input-wrap:focus-within { border-color: var(--tezmenu-primary, #2E7D32); }
.tez-mobile-prefix {
    padding: 12px 12px;
    background: #f5f5f5;
    color: #555;
    font-weight: 700;
    font-size: 14.5px;
    border-right: 1.5px solid #ddd;
}
.tez-mobile-input { flex: 1; border: none; outline: none; padding: 12px 14px; font-size: 15px; letter-spacing: .5px; }
.tez-modal-message { margin-top: 12px; font-size: 13px; color: #888; text-align: center; min-height: 16px; }
.tez-modal-message.tez-error { color: #e11d48; font-weight: 600; }

/* ===== Full-page popups (Your Orders / Order Detail) =====
   `visibility` (not just the translateY transform) genuinely hides
   this — a mobile keyboard opening recalculates the viewport height,
   and a pure percentage-based transform can momentarily resolve
   wrong when that happens, letting the "hidden" page flash into
   view. Delaying the visibility change on close (not on open) keeps
   the existing slide animation in both directions. */
.tez-fullpage {
    position: fixed;
    inset: 0;
    background: #f7f7f8;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.4,0,.2,1), visibility 0s linear .3s;
    z-index: 9998;
    display: flex;
    flex-direction: column;
}
.tez-fullpage.tez-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.tez-fullpage-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.tez-fullpage-title { font-size: 16.5px; font-weight: 700; color: #111; flex: 1; }
.tez-fullpage-header .tez-fullpage-change-number {
    border: none !important;
    background: none !important;
    color: var(--tezmenu-primary, #2E7D32) !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 6px 4px !important;
    flex-shrink: 0 !important;
}
.tez-fullpage-header .tez-fullpage-back {
    position: static !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #f2f2f2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #333 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    flex-shrink: 0 !important;
}
.tez-fullpage-header .tez-fullpage-back svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
}
.tez-fullpage-body { flex: 1; overflow-y: auto; padding: 14px 14px 30px; }

.tez-order-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.tez-order-card-top { display: flex; justify-content: space-between; align-items: center; }
.tez-order-code { font-weight: 700; font-size: 14.5px; color: #111; }
.tez-order-status {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: capitalize;
    background: #eee;
    color: #555;
}
.tez-order-status-completed { background: #dcfce7; color: #15803d; }
.tez-order-status-pending   { background: #fef9c3; color: #a16207; }
.tez-order-status-preparing { background: #dbeafe; color: #1d4ed8; }
.tez-order-status-ready     { background: #ede9fe; color: #6d28d9; }
.tez-order-status-rejected,
.tez-order-status-cancelled { background: #fee2e2; color: #b91c1c; }

.tez-order-card-meta { font-size: 12px; color: #888; margin-top: 4px; }
.tez-order-card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.tez-order-total { font-weight: 700; font-size: 14px; color: #111; }
.tez-view-order-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    border: none !important;
    background: linear-gradient(180deg, color-mix(in srgb, var(--tezmenu-primary, #2E7D32) 82%, white), var(--tezmenu-primary, #2E7D32)) !important;
    color: #fff !important;
    padding: 9px 16px !important;
    border-radius: 999px !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    white-space: nowrap !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18) !important;
}

.tez-view-order-btn:active {
    transform: scale(0.96) !important;
}

.tez-view-order-btn svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
}

.tez-order-empty { text-align: center; color: #888; padding: 40px 0; font-size: 14px; }
.tez-order-detail-loading { text-align: center; color: #888; padding: 40px 0; font-size: 14px; }
.tez-order-info-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.tez-order-info-top { display: flex; justify-content: space-between; align-items: center; }
.tez-order-detail-code { font-size: 17px; font-weight: 700; color: #111; }
.tez-order-detail-meta { font-size: 12.5px; color: #888; margin-top: 4px; }
.tez-order-reward-banner {
    background: #ecfdf5;
    color: #047857;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 14px;
}
.tez-order-items-list {
    background: #fff;
    border-radius: 14px;
    padding: 4px 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.tez-order-item-row { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.tez-order-item-row:last-child { border-bottom: none; }
.tez-order-item-qty { font-weight: 700; color: #666; font-size: 13px; flex-shrink: 0; }
.tez-order-item-name { flex: 1; font-size: 13.5px; color: #222; font-weight: 600; }
.tez-order-item-variables { font-size: 11.5px; color: #999; font-weight: 400; margin-top: 2px; }
.tez-order-item-price { font-size: 13.5px; font-weight: 700; color: #111; flex-shrink: 0; }
.tez-order-pricing-list {
    background: #fff;
    border-radius: 14px;
    padding: 4px 16px;
    margin-top: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.tez-pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}
.tez-pricing-row:last-child { border-bottom: none; }
.tez-pricing-row.tez-pricing-discount { color: #15803d; font-weight: 600; }
.tez-order-detail-total-row {
    display: flex;
    justify-content: space-between;
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 14px;
    font-weight: 700;
    font-size: 15px;
    color: #111;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
