/* =============================================================
   portal-responsive.css
   Drop-in replacement for the table-based portal layout.
   Imports the existing vendor styles (jquery-ui, pgwmodal, etc.)
   and overrides only structural / layout rules.

   Breakpoints:
     mobile  : < 768px
     tablet  : 768px – 1099px
     desktop : ≥ 1100px
   ============================================================= */

/* ---- Reset & base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: #fff;
    color: #000;
    font-family: helvetica, arial, sans-serif;
    font-size: 13px;
}

a               { text-decoration: none; color: #1a56cc; font-weight: bold; }
a:hover         { color: #c00; }
img             { max-width: 100%; height: auto; }

/* Preloader overlay (unchanged logic) */
.se-pre-con {
    position: fixed; inset: 0;
    z-index: 9999;
    background: url('../images/preloader.gif') center no-repeat #fff;
}

/* Anchor offset so fixed header doesn't cover section titles */
.anchor-target {
    display: block;
    position: relative;
    top: -80px;
    visibility: hidden;
}

/* ---- Site header ------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.site-header__inner {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- Page layout ------------------------------------------- */
/*
  Mobile  : single column — menu content full-width, cart hidden behind FAB/drawer
  Tablet  : two columns — menu 60% | cart 38%
  Desktop : three columns — cat-nav 180px | menu auto | cart 320px
*/
.page-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "menu"
        "cart";
    max-width: 1500px;
    margin: 0 auto;
    padding: 16px 12px 40px;
    gap: 0 24px;
    align-items: start;
}

@media (min-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr 300px;
        grid-template-areas: "menu cart";
        padding: 20px 20px 60px;
    }
}

@media (min-width: 1100px) {
    .page-layout {
        grid-template-columns: 180px 1fr 320px;
        grid-template-areas: "nav menu cart";
        padding: 24px 24px 80px;
    }
}

/* ---- Category sidebar nav ---------------------------------- */
.cat-nav {
    display: none; /* hidden on mobile & tablet; shown desktop */
    grid-area: nav;
}
@media (min-width: 1100px) {
    .cat-nav {
        display: block;
        position: sticky;
        top: 72px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
}

.cat-nav__label {
    font-weight: bold;
    font-size: 13px;
    color: #444;
    padding: 6px 8px 10px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.cat-nav__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cat-nav__link {
    display: block;
    padding: 7px 10px;
    border-radius: 5px;
    color: #333;
    font-size: 12.5px;
    font-weight: normal;
    line-height: 1.3;
    transition: background .15s, color .15s;
}
.cat-nav__link:hover,
.cat-nav__link.is-active {
    background: #f0f4ff;
    color: #1a56cc;
    font-weight: bold;
}

/* ---- Merchant info bar ------------------------------------- */
.menu-content { grid-area: menu; }

.merchant-info {
    text-align: center;
    padding: 12px 8px 18px;
    /*border-bottom: 2px solid #1e3678;*/
    margin-bottom: 8px;
}
.merchant-info__name {
    font-size: 1.5em;
    font-weight: bold;
    color: #000;
    margin: 0 0 4px;
}
.merchant-info__address,
.merchant-info__hours {
    margin: 2px 0;
    font-size: 13px;
    color: #555;
}

/* ---- Menu sections ----------------------------------------- */
.menu-section {
    margin-bottom: 28px;
}

.menu-section__title {
    font-size: 1.25em;
    font-weight: bolder;
    color: #000;
    margin: 0 0 4px;
    padding-top: 8px;
}
.menu-section__desc {
    font-size: 1em;
    font-style: italic;
    color: #555;
    margin-bottom: 6px;
}
.menu-section__divider {
    border-top: 2px solid #1e3678;
    margin-bottom: 12px;
}

/* ---- Menu grid --------------------------------------------- */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    column-gap: 24px;
}
@media (max-width: 600px) {
    .menu-grid { grid-template-columns: 1fr; }
}

/* ---- Menu item row ----------------------------------------- */
.menu-item-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 6px;
    border-bottom: 1px dashed #aaa;
    font-size: 1.05em;
    min-height: 50px;
    background: #fff;
    transition: background .12s;
}
.menu-item-row--clickable { cursor: pointer; }
.menu-item-row--clickable:hover { background: #fffde7; }

/* Image fixed on the left */
.menu-item-row__img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    display: block;
}

/* Info in the middle — flex-1 */
.menu-item-row__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.menu-item-row__name {
    display: block;
    line-height: 1.3;
    font-size: 1em;
}
.menu-item-row__badge {
    vertical-align: middle;
    margin-left: 4px;
    height: 16px;
}
.menu-item-row__desc {
    font-style: italic;
    font-size: 0.88em;
    color: #555;
    line-height: 1.3;
}
.menu-item-row__price {
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 72px;
    text-align: left;
    padding-left: 8px;
    align-self: flex-start;
    padding-top: 2px;
}
.menu-item-row__plus { color: #d00; font-size: 0.85em; }

/* ---- Cart sidebar (desktop/tablet) ------------------------- */
.cart-sidebar {
    grid-area: cart;
    display: none; /* hidden on mobile — use drawer instead */
}

@media (min-width: 768px) {
    .cart-sidebar {
        display: block;
        position: sticky;
        top: 72px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
}

.cart-sidebar__inner {
    background: #ffffd2;
    border-radius: 6px;
    border: 1px solid #ffefef; 
    box-shadow: 2px 2px 5px #c0c0c0;
    padding: 8px;
}

/* ---- Cart: shared styles (used by both sidebar & drawer) --- */
.order_title {
    text-align: center;
    font-size: 1.2em;
    font-weight: bolder;
    padding: 8px 10px;
}

.ordersection {
    background: #ffffd2;
    border-radius: 6px;
    box-shadow: 2px 2px 5px #c0c0c0;
    width: 100%;
}

.cart_table      { border-collapse: collapse; width: 100%; }

.orderlist_head thead tr th {
    border-bottom: 2px solid #000040;
    padding: 5px 0;
    font-size: 1.05em;
}
.orderlist_head tr td {
    border-bottom: 1px dashed #aaa;
    padding: 5px 0;
    font-size: 1.05em;
}
.orderlist_head tr:hover       { background: #ffffaa; cursor: default; }
.orderlist_foot tfoot tr td {
    border-top: 2px solid #000040;
    padding: 5px 0;
    font-size: 1.05em;
}

.item_note  { color: #800000; display: inline; }
.tiny_note  { color: #666; text-align: center; font-size: 0.85em; padding: 10px 20px; }
.normal_text { font-size: 1.05em; }
.news       { color: #f00; }

/* Checkout button */
.mbtn {
    background: linear-gradient(to bottom, #3498db, #2980b9);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 1.1em;
    padding: 10px 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.mbtn:hover {
    background: linear-gradient(to bottom, #3cb0fd, #3498db);
}

/* Inputs */
.popup_cart, input.box, textarea.box, select.box {
    font-size: 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    padding: 4px 6px;
}
textarea.box { width: 100%; background: #ffffca; }

/* ---- Mobile cart FAB --------------------------------------- */
.cart-fab {
    display: flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 300;
    background: #1a56cc;
    color: #fff;
    border: none;
    border-radius: 28px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.cart-fab:hover { background: #1040aa; }

@media (min-width: 768px) {
    .cart-fab { display: none; }
}

/* ---- Mobile cart drawer ------------------------------------ */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 400;
}
.cart-overlay.is-visible { display: block; }

.cart-drawer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-height: 80vh;
    overflow-y: auto;
    background: #ffffd2;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.15);
    z-index: 500;
    transform: translateY(100%);
    transition: transform .28s ease;
    padding: 0 12px 24px;
}
.cart-drawer.is-open { transform: translateY(0); }

.cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px 8px;
    border-bottom: 1px solid #e0df9e;
    position: sticky;
    top: 0;
    background: #ffffd2;
}
.cart-drawer__close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0 4px;
}

@media (min-width: 768px) {
    .cart-drawer, .cart-overlay { display: none !important; }
}

/* ---- Footer ------------------------------------------------ */
.site-footer {
    border-top: 1px solid #ccc;
    padding: 12px 20px;
    font-size: 11px;
    color: #999;
}
#baFooterTable p { margin: 5px 0; }

/* ---- Utility ----------------------------------------------- */
.info_hiden { display: none !important; }

.modal {
    display: none;
    position: fixed; inset: 0;
    z-index: 1000;
    background: rgba(255,255,255,.8) url('../images/load.gif') 50% 50% no-repeat;
}
body.loading { overflow: hidden; }
body.loading .modal { display: block; }

#space { border-top: 0; font-size: 2px; margin: 4px 0 0; }

/* pgwmodal close button override */
.pgwModal .pm-body { padding: 12px 16px; }

/* =============================================================
   cart.jsp styles
   ============================================================= */

.cart-panel { font-size: 14px; }

/* ---- Notice banners --------------------------------------- */
.cart-notice {
    padding: 12px 10px;
    border-radius: 5px;
    margin-bottom: 8px;
    font-size: 1em;
    font-weight: bold;
    background: #f0f4ff;
    color: #1a56cc;
    text-align: center;
    border: 1px solid #c5d5f5;
}
.cart-notice--warn  { background: #fdecea; color: #c0392b; border-color: #f5c5c5; }
.cart-notice--info  { background: #fff3cd; color: #7a5800; border-color: #f0d890; font-weight: normal; }
.cart-notice--info  { background: #fff3cd; color: #7a5800; }

/* ---- Column headers --------------------------------------- */
.cart-header {
    display: flex;
    align-items: center;
    padding: 5px 0 5px;
    border-bottom: 2px solid #000040;
    font-weight: bold;
    font-size: 0.95em;
    gap: 4px;
}
.cart-header__name  { flex: 1; }
.cart-header__qty   { width: 30px; text-align: center; }
.cart-header__price { width: 52px; text-align: right; }
.cart-header__del   { width: 20px; }

/* ---- Item rows -------------------------------------------- */
.cart-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 0;
    border-bottom: 1px dashed #aaa;
}
/*.cart-row:hover { background: #fffde7; }*/
.cart-row:hover { background: #ffffff; }

.cart-row__name {
    flex: 1;
    line-height: 1.3;
    font-size: 0.95em;
}
.cart-row__note {
    display: block;
    color: #800000;
    font-size: 0.88em;
}
.cart-row__qty {
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.cart-row__qty-num { min-width: 18px; text-align: center; font-weight: bold; }
.cart-row__price   { width: 52px; text-align: right; font-size: 0.95em; }
.cart-row__del     { width: 20px; text-align: right; }

/* Qty +/− buttons */
.cart-qty-btn {
    width: 20px; height: 20px;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #f5f5f5;
    cursor: pointer;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cart-qty-btn:hover { background: #e0e0e0; }
.cart-qty-btn svg {
    width: 10px; height: 10px;
    stroke: #333; stroke-width: 2;
    stroke-linecap: round; fill: none;
}

/* Delete button */
.cart-del-btn {
    width: 20px; height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
}
.cart-del-btn:hover svg { stroke: #c0392b; }
.cart-del-btn svg {
    width: 12px; height: 12px;
    stroke: #aaa; stroke-width: 2;
    stroke-linecap: round; fill: none;
}

/* ---- Totals block ----------------------------------------- */
.cart-totals {
    margin-top: 4px;
}
.cart-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-top: 1px dashed #aaa;
    font-size: 0.95em;
    gap: 6px;
}
.cart-totals__row:first-child { border-top: none; }
.cart-totals__row--discount { color: #c0392b; }
.cart-totals__row--total {
    border-top: 2px solid #000040;
    border-bottom: none;
    font-size: 1.05em;
    padding-top: 7px;
}
.cart-totals__row--tip,
.cart-totals__row--coupon { flex-wrap: wrap; gap: 4px; }

.cart-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid #aaa;
    font-size: 10px;
    color: #888;
    cursor: help;
    margin-left: 3px;
}

/* Tip input */
.cart-tip-input {
    width: 52px;
    text-align: right;
    font-size: 12px;
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Coupon */
.cart-coupon-input {
    width: 80px;
    font-size: 12px;
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.cart-apply-btn {
    font-size: 11px;
    padding: 2px 7px;
    border: 1px solid #1a56cc;
    border-radius: 4px;
    background: #fff;
    color: #1a56cc;
    cursor: pointer;
    margin-left: 4px;
}
.cart-apply-btn:hover { background: #eef3ff; }

/* Select */
.cart-select {
    display: block;
    width: 100%;
    font-size: 13px;
    font-family: inherit;
    color: #111;
    background: #fff;
    border: 1.5px solid #ccc;
    border-radius: 7px;
    padding: 8px 32px 8px 10px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpolyline points='1,1 6,7 11,1' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color .15s, box-shadow .15s;
    max-width: 100%;
}
.cart-select:focus {
    outline: none;
    border-color: #DA4336;
    box-shadow: 0 0 0 2px rgba(218,67,54,.1);
}
.cart-select:hover {
    border-color: #aaa;
}

/* Pickup time label */
.cart-section__label--pickup {
    font-size: 0.88em;
    font-weight: bold;
    color: #444;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Section blocks (napkin, shipping, note) -------------- */
.cart-section {
    padding: 8px 0 6px;
    border-bottom: 1px solid #f0f0f0;
}
.cart-section__label {
    font-weight: bold;
    font-size: 0.93em;
    margin-bottom: 5px;
}
.cart-section__hint {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
    line-height: 1.4;
}
.cart-section__options {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.cart-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.cart-radio input[type="radio"] {
    display: none;
}
.cart-radio-pill {
    display: inline-block;
    padding: 7px 18px;
    border: 1.5px solid #ccc;
    border-radius: 24px;
    font-size: 0.9em;
    color: #555;
    background: #fff;
    transition: border-color .15s, background .15s, color .15s;
    white-space: nowrap;
    user-select: none;
}
.cart-radio:hover .cart-radio-pill {
    border-color: #DA4336;
    color: #DA4336;
}
.cart-radio input[type="radio"]:checked + .cart-radio-pill {
    border-color: #DA4336;
    background: #fdecea;
    color: #DA4336;
    font-weight: bold;
}

/* Textarea */
.cart-textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 6px 8px;
    background: #ffffff !important;
    resize: vertical;
}

/* ---- Checkout button -------------------------------------- */
.cart-checkout {
    padding: 12px 0 4px;
    text-align: right;
}
.cart-checkout .mbtn {
    background: #DA4336;
    border-radius: 9px;
}
.cart-checkout .mbtn:hover  { background: #c0392b; }
.cart-checkout .mbtn:active { background: #a93226; }

/* ---- Tax and Fees expandable row -------------------------- */
.cart-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    vertical-align: middle;
    line-height: 1;
}
.cart-expand-btn svg {
    width: 10px; height: 10px;
    stroke: #555; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    fill: none;
    display: inline-block;
    vertical-align: middle;
}
.cart-taxfees-detail {
    background: #fafafa;
    border-radius: 4px;
    margin: 0 0 2px 8px;
}
.cart-taxfees-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 6px;
    font-size: 0.88em;
    color: #555;
    border-top: 1px dashed #ddd;
}
.cart-taxfees-item:first-child { border-top: none; }

/* ---- Menu image disclaimer notice ------------------------- */
.menu-img-notice {
    font-size: 0.78em;
    font-style: italic;
    color: #999;
    text-align: center;
    padding: 12px 8px 4px;
    line-height: 1.5;
    margin: 0;
}

/* ---- Optional badge --------------------------------------- */
.cart-optional-badge {
    display: inline-block;
    font-size: 0.72em;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 20px;
    background: #eaf4e8;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 6px;
}
