/**
 * KDS Menu Builder Frontend Styles (Minimal)
 *
 * Dynamic colours via CSS custom properties injected via PHP (wp_add_inline_style):
 *   --code-order-primary, --code-order-primary-hover, --code-order-btn-text, --code-order-primary-rgb
 *
 * Do NOT add a :root block here — it would override the settings-defined colors
 * on pages where menu-frontend.css is loaded without the inline PHP override (e.g. checkout block).
 */

/* ================================================================
   Menu Layout
   ================================================================ */
.code-order-menu-wrap {
    width: 100%;
    max-width: 100%;
    font-family: inherit;
}

/* ================================================================
   Store Header
   ================================================================ */
.code-order-store-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px 0 16px;
    margin-bottom: 0px;
    max-width: 100%;
}

/* Cards */
.code-order-sh-card {
    border-radius: 14px;
    background: #fff;
    transition: box-shadow 0.2s;
    overflow-x: hidden;
    min-width: 0;
}

.code-order-sh-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.code-order-sh-card-inner {
    padding: 16px 18px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Consistent spacing between header, address, and badges */
}

.code-order-menu-content {
    margin-top: 0;
    background: #ffffff;
}

/* Store name */
.code-order-store-name {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 0px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

/* Meta row */
.code-order-store-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #585858;
    line-height: 1;
}

/* Badge */
.code-order-store-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

.code-order-store-badge--open {
    background: #e6fcf5;
    color: #0ca678;
    border: 1px solid #c3fae8;
}

.code-order-store-badge--closed {
    background: #fff5f5;
    color: #fa5252;
    border: 1px solid #ffe3e3;
}

/* Hours + Address inline */
.code-order-store-hours {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.code-order-store-closure {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 4px 10px;
}

.code-order-store-address {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 0px;
    font-size: 13px;
    color: #585858;
    line-height: 1.4;
}

.code-order-store-hours svg,
.code-order-store-address svg {
    flex-shrink: 0;
    opacity: 0.45;
}

/* See hours button */
.code-order-store-header-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.code-order-store-link-sep {
    color: #cbd5e1;
    font-size: 14px;
}

.code-order-see-hours-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--code-order-primary);
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}

.code-order-see-hours-btn:hover {
    opacity: 0.75;
}

.code-order-see-hours-btn svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.code-order-see-hours-arrow {
    opacity: 0.4 !important;
}

/* Service type toggle */
.code-order-service-toggle {
    display: flex;
    background: #f4f4f4;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
    max-width: 100%;
    box-sizing: border-box;
}

.code-order-service-zone-hint {
    margin: 10px 0 0;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.45;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.code-order-service-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-height: 44px;
    padding: 8px 12px;
    border: 1.5px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #777;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
    line-height: 1.2;
}

.code-order-service-btn:hover {
    color: #333;
}

.code-order-service-btn:focus {
    outline: none;
}

.code-order-service-btn:focus-visible {
    outline: 2px solid var(--code-order-primary, #6f00ff);
    outline-offset: 2px;
    z-index: 1;
}

.code-order-service-btn.is-active {
    background: var(--code-order-primary, #6f00ff);
    color: var(--code-order-btn-text, #fff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.code-order-service-btn svg {
    flex-shrink: 0;
}

/* Paused — not selectable; still tappable for feedback message */
.code-order-service-btn.code-order-service-btn--paused {
    opacity: 0.92;
    cursor: pointer;
    color: #78716c;
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(214, 211, 209, 0.9);
}

.code-order-service-btn.code-order-service-btn--paused svg {
    color: #a8a29e;
}

.code-order-service-btn.code-order-service-btn--paused:hover {
    color: #57534e;
    background: rgba(255, 255, 255, 0.65);
    border-color: #d6d3d1;
}

/* Out of zone — not selectable as service; tap still opens message + address flow */
.code-order-service-btn.code-order-service-btn--unavailable {
    opacity: 0.88;
    cursor: pointer;
    color: #64748b;
    background: transparent;
    border: 1.5px solid transparent;
    box-shadow: none;
}
.code-order-service-btn.code-order-service-btn--unavailable svg {
    color: #94a3b8;
}

.code-order-service-btn.code-order-service-btn--unavailable:hover {
    color: #475569;
    background: rgba(255, 255, 255, 0.85);
    border-color: #94a3b8;
}

.code-order-service-btn.code-order-service-btn--unavailable:focus-visible {
    outline-color: var(--code-order-primary, #6f00ff);
}

/* Paused overrides zone styling when both apply (admin pause takes precedence). */
.code-order-service-btn.code-order-service-btn--paused.code-order-service-btn--unavailable {
    background: rgba(255, 255, 255, 0.35);
    border: 1.5px solid rgba(214, 211, 209, 0.9);
    border-style: solid;
    color: #78716c;
    box-shadow: none;
}

.code-order-service-btn.code-order-service-btn--paused.code-order-service-btn--unavailable svg {
    color: #a8a29e;
}

.code-order-service-btn.code-order-service-btn--paused.code-order-service-btn--unavailable:hover {
    background: rgba(255, 255, 255, 0.65);
    border-color: #d6d3d1;
    color: #57534e;
}

/* Pause notice banner (UberEats style) */
.code-order-service-pause-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 16px;
    background: #FFFAF0;
    /* subtle light amber */
    border: 1px solid #F6E05E;
    /* soft amber */
    border-radius: 10px;
    color: #1a1a1a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.code-order-service-pause-notice .code-order-spn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #F6E05E;
    border-radius: 50%;
    color: #975A16;
    /* dark amber */
    flex-shrink: 0;
}

.code-order-service-pause-notice .code-order-spn-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}

.code-order-service-pause-notice strong {
    font-size: 14.5px;
    font-weight: 600;
}

.code-order-service-pause-notice .code-order-spn-sub {
    font-size: 13px;
    color: #4a4a4a;
}

.code-order-spn-cross-promo {
    margin-top: 4px;
    color: #16a34a;
    /* Tailwind Green 600 */
    font-weight: 600;
    font-size: 14px;
}


/* ================================================================
   Hours Modal
   ================================================================ */
.code-order-hours-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.code-order-hours-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.code-order-hours-modal {
    background: #fff;
    border-radius: 16px;
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.code-order-hours-modal-overlay.is-open .code-order-hours-modal {
    transform: translateY(0) scale(1);
}

/* ── Delivery Zones Modal Styles ─────────────────────────── */
.code-order-dz-intro {
    font-size: 14px;
    color: #718096;
    margin-bottom: 24px;
    line-height: 1.6;
}

.code-order-dz-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.code-order-dz-item {
    display: block;
    padding: 18px;
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-order-dz-item:hover {
    border-color: var(--code-order-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.code-order-dz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.code-order-dz-label {
    font-weight: 700;
    font-size: 16px;
    color: #1a202c;
}

.code-order-dz-icon {
    color: #cbd5e0;
}

.code-order-dz-value-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    font-family: inherit;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 16px;
    border: 1px solid #f1f5f9;
}

.code-order-dz-pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.code-order-dz-price-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.code-order-dz-p-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #a0aec0;
    letter-spacing: 0.025em;
}

.code-order-dz-p-value {
    font-weight: 800;
    font-size: 14.5px;
    color: #2d3748;
}

.code-order-dz-p-value.is-free {
    color: #10b981;
}

.code-order-dz-free-hint {
    margin-top: 14px;
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Address Modal — Minimal Redesign ──────────────────────── */

/* Overlay */
.code-order-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 16px;
}

.code-order-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Card */
.code-order-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    transform: translateY(12px);
    transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.2s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
}

.code-order-modal-overlay.is-open .code-order-modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Service switch confirmation */
body.code-order-service-switch-open {
    overflow: hidden;
}

.code-order-service-switch-content {
    max-width: 480px;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, 0.07);
}

.code-order-service-switch-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 32px;
    align-items: start;
    gap: 14px;
    padding: 24px 24px 18px;
}

.code-order-service-switch-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(var(--code-order-primary-rgb, 26, 115, 232), 0.12);
    color: var(--code-order-primary, #1a73e8);
}

.code-order-service-switch-icon svg {
    width: 22px;
    height: 22px;
}

.code-order-service-switch-heading h3 {
    margin: 1px 0 6px;
    color: #111827;
    font-size: 19px;
    font-weight: 750;
    line-height: 1.25;
}

.code-order-service-switch-heading p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.code-order-service-switch-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.code-order-service-switch-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.code-order-service-switch-close svg {
    width: 18px;
    height: 18px;
}

.code-order-service-switch-body {
    padding: 0 24px 22px;
}

.code-order-service-switch-items {
    display: grid;
    gap: 8px;
    max-height: 190px;
    margin: 0;
    padding: 12px;
    overflow-y: auto;
    list-style: none;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.code-order-service-switch-items li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.code-order-service-switch-item-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--code-order-primary, #1a73e8);
    box-shadow: 0 0 0 4px rgba(var(--code-order-primary-rgb, 26, 115, 232), 0.11);
}

.code-order-service-switch-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 2px 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

.code-order-service-switch-note svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.code-order-service-switch-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 22px;
    border-top: 1px solid #eef0f2;
}

.code-order-service-switch-btn {
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.code-order-service-switch-btn:hover {
    transform: translateY(-1px);
}

.code-order-service-switch-btn:focus-visible,
.code-order-service-switch-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--code-order-primary-rgb, 26, 115, 232), 0.2);
}

.code-order-service-switch-btn--cancel {
    border-color: #dfe3e8;
    background: #fff;
    color: #374151;
}

.code-order-service-switch-btn--cancel:hover {
    background: #f9fafb;
    border-color: #cfd5dc;
}

.code-order-service-switch-btn--confirm {
    background: var(--code-order-primary, #1a73e8);
    color: var(--code-order-btn-text, #fff);
    box-shadow: 0 6px 16px rgba(var(--code-order-primary-rgb, 26, 115, 232), 0.22);
}

.code-order-service-switch-btn--confirm:hover {
    background: var(--code-order-primary-hover, #155fc0);
}

/* Step Indicator */
.code-order-modal-steps {
    padding: 20px 24px 0;
}

.code-order-modal-steps__track {
    display: flex;
    align-items: center;
    gap: 0;
}

.code-order-modal-steps__item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #b0bec5;
    transition: color 0.2s;
}

.code-order-modal-steps__item.is-active {
    color: #1a1a2e;
    font-weight: 600;
}

.code-order-modal-steps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    background: #eceff1;
    color: #90a4ae;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.code-order-modal-steps__item.is-active .code-order-modal-steps__num {
    background: var(--code-order-primary, #1a73e8);
    color: #fff;
}

.code-order-modal-steps__label {
    white-space: nowrap;
}

.code-order-modal-steps__sep {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
    margin: 0 10px;
    min-width: 16px;
}

/* Modal Header */
.code-order-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px 0;
}

.code-order-modal-header__text {
    flex: 1;
    min-width: 0;
}


.code-order-modal-header h3 {
    margin: 0 0 2px;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}

/* Visibility based on step */
.code-order-address-modal-content[data-step="1"] .code-order-step-2-only {
    display: none !important;
}

.code-order-address-modal-content[data-step="2"] .code-order-step-1-only {
    display: none !important;
}

.code-order-modal-header p {
    margin: 0;
    font-size: 13px;
    color: #78909c;
    line-height: 1.45;
}

.code-order-modal-close {
    flex-shrink: 0;
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #90a4ae;
    transition: background 0.15s, color 0.15s;
    margin-top: 2px;
}

.code-order-modal-close:hover {
    background: #f5f5f5;
    color: #263238;
}

/* Modal Body */
.code-order-modal-body {
    padding: 20px 24px 24px;
}

.code-order-modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #f0f0f0;
}

.code-order-step-description {
    font-size: 13px;
    color: #78909c;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ── Form Fields ── */
.code-order-form-group {
    margin-bottom: 12px;
    position: relative;
}

.code-order-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #78909c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

/* Street input wrapper (with icon) */
.code-order-input-with-icon {
    position: relative;
    width: 100%;
}

.code-order-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0bec5;
    pointer-events: none;
    z-index: 2;
    width: 16px;
    height: 16px;
    transition: color 0.15s;
}

.code-order-input-with-icon:focus-within .code-order-input-icon {
    color: var(--code-order-primary, #1a73e8);
}

.code-order-input-with-icon input {
    width: 100%;
    padding: 0 14px 0 38px !important;
    height: 46px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    box-sizing: border-box;
    color: #212121;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    appearance: none;
}

.code-order-input-with-icon input:focus {
    outline: none;
    border-color: var(--code-order-primary, #1a73e8);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--code-order-primary, #1a73e8) 12%, transparent);
}

/* Plain inputs (postcode, city — no icon wrapper) */
.code-order-addr-input {
    width: 100%;
    padding: 0 14px !important;
    height: 46px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    box-sizing: border-box;
    color: #212121;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    appearance: none;
    display: block;
}

.code-order-addr-input:focus {
    outline: none;
    border-color: var(--code-order-primary, #1a73e8);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--code-order-primary, #1a73e8) 12%, transparent);
}

.code-order-form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px;
    margin-bottom: 4px;
}

/* ── Check Branches Button ── */
.code-order-check-address-btn {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 16px;
    padding: 0 20px;
    background: var(--code-order-primary, #1a73e8);
    color: var(--code-order-btn-text, #fff);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background 0.15s, opacity 0.15s;
}

.code-order-check-address-btn:hover {
    background: var(--code-order-primary-hover, #1558b0);
}

.code-order-check-address-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.code-order-modal-error {
    color: #e53935;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

/* ── Step 2 — Selected Address Summary ── */
.code-order-selected-address-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.code-order-sas-icon {
    color: var(--code-order-primary, #1a73e8);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.code-order-sas-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.code-order-sas-addr {
    font-size: 13px;
    font-weight: 500;
    color: #37474f;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-order-sas-edit {
    font-size: 12px;
    font-weight: 500;
    color: var(--code-order-primary, #1a73e8);
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.code-order-sas-edit:hover {
    opacity: 0.75;
}

/* ── Location List ── */
.code-order-location-list {
    margin-top: 4px;
}

.code-order-location-list h4 {
    font-size: 11px;
    font-weight: 600;
    color: #90a4ae;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
}

/* ── Branch Items ── */
.code-order-location-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px 13px 16px;
    border: 1px solid #e8ecef;
    border-left: 3px solid #e8ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    background: #fff;
    position: relative;
}

.code-order-location-item:hover {
    border-color: color-mix(in srgb, var(--code-order-primary, #1a73e8) 40%, #e8ecef);
    border-left-color: var(--code-order-primary, #1a73e8);
    background: #fafcff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.code-order-location-item.is-current {
    border-color: #c8e6c9;
    border-left-color: #43a047;
    background: #f9fbe7;
}

.code-order-location-item.status-unavailable,
.code-order-location-item.status-closed {
    cursor: not-allowed;
    opacity: 0.5;
    background: #fafafa;
}

.code-order-location-item.status-unavailable:hover,
.code-order-location-item.status-closed:hover {
    border-color: #e8ecef;
    border-left-color: #e8ecef;
    background: #fafafa;
    box-shadow: none;
}

/* 2-Step Modal Transitions */
.code-order-step-address,
.code-order-step-branches {
    transition: opacity 0.22s ease;
}

.code-order-modal-content[data-step="1"] .code-order-step-address {
    display: block;
    opacity: 1;
}

.code-order-modal-content[data-step="1"] .code-order-step-branches {
    display: none;
    opacity: 0;
}

.code-order-modal-content[data-step="2"] .code-order-step-address {
    display: none;
    opacity: 0;
}

.code-order-modal-content[data-step="2"] .code-order-step-branches {
    display: block;
    opacity: 1;
}

/* Branch Item Content */
.code-order-li-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.code-order-li-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-order-li-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
}

.code-order-li-msg {
    font-size: 12px;
    color: #78909c;
    line-height: 1.4;
}

.code-order-li-fee {
    font-size: 11px;
    font-weight: 500;
    color: #546e7a;
    margin-top: 1px;
}

.code-order-li-check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: code-order-pop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hidden — no longer needed */
.code-order-li-select-indicator {
    display: none;
}

@keyframes code-order-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Loading State */
.code-order-location-item.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

.code-order-location-item.is-loading::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    margin-top: -9px;
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--code-order-primary, #1a73e8);
    border-radius: 50%;
    animation: code-order-spin 0.6s linear infinite;
}

/* Spotlight Effect */
@keyframes code-order-spotlight-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.35); border-color: #e53935; }
    70%  { box-shadow: 0 0 0 8px rgba(229, 57, 53, 0);  border-color: #e53935; }
    100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);    border-color: #e53935; }
}

.code-order-delivery-address-section.is-spotlight {
    animation: code-order-spotlight-pulse 2s infinite;
}

.code-order-da-placeholder {
    color: #e62222;
    font-weight: 600;
}

/* New Address Card styles */
.code-order-delivery-address-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 14px;
    background: #f9f9f9;
    /* Lighter, cleaner background */
    border: none;
    /* Soft border */
    border-radius: 12px;
    transition: all 0.2s ease;
}

.code-order-delivery-address-section:hover {
    background: #f7f7f7;
    border-color: #f7f7f7;
}

.code-order-da-icon {
    width: 36px;
    height: 36px;
    background: #fff;
    /* White circle for icon */
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.code-order-da-content {
    flex: 1;
    min-width: 0;
}

.code-order-da-label {
    font-size: 14px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.code-order-da-change-btn {
    background: var(--code-order-primary, #6f00ff);
    color: var(--code-order-btn-text, #ffffff);
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.code-order-da-change-btn:hover {
    opacity: 0.9;
}

/* Modal header */
.code-order-hours-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.code-order-hours-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.code-order-hours-modal-title svg {
    opacity: 0.4;
}

.code-order-hours-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #555555;
    padding: 0 2px;
    transition: color 0.15s;
}

.code-order-hours-modal-close:hover {
    color: #333;
}

/* Modal body */
.code-order-hours-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: 70vh;
}

/* Hours Tabs */
.code-order-hours-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.code-order-h-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.2s ease;
}

.code-order-h-tab.is-active {
    background: #fff;
    color: var(--code-order-primary, #00b37e);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.code-order-h-pane {
    animation: code-order-fade-in 0.3s ease;
}

@keyframes code-order-fade-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section inside modal */
.code-order-hours-section {
    margin-bottom: 20px;
}

.code-order-hours-section:last-child {
    margin-bottom: 0;
}

.code-order-hours-section+.code-order-hours-section {
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.code-order-hours-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.code-order-hours-section-title svg {
    opacity: 0.35;
    flex-shrink: 0;
}

/* Schedule grid (used in modal) */
.code-order-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.code-order-schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    transition: background 0.2s;
}

.code-order-schedule-row:hover {
    background: #f8fafc;
}

.code-order-schedule-row.is-today {
    background: #f1f5f9;
    font-weight: 700;
    color: var(--code-order-primary, #00b37e);
}

.code-order-schedule-day {
    color: #4b5563;
    min-width: 100px;
}

.code-order-schedule-row.is-today .code-order-schedule-day {
    color: inherit;
}

.code-order-schedule-time {
    color: #111827;
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-weight: 500;
}

.code-order-schedule-closed {
    color: #9ca3af;
    font-weight: normal;
}

.code-order-schedule-closed {
    color: #ccc;
    font-style: italic;
}

#code-order-badge-area {
    margin-top: 0px;
    transition: opacity 0.2s ease;
}

#code-order-badge-area.is-updating {
    opacity: 0.4;
    pointer-events: none;
}

/*  Address bar  */
.code-order-address-bar {
    transition: opacity 0.25s ease, max-height 0.3s ease;
    max-height: 500px;
    max-width: 100%;
    box-sizing: border-box;
}

.code-order-address-bar.is-hidden {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    pointer-events: none;
    overflow: hidden;
}

@keyframes code-order-address-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(100, 4, 183, 0.4);
        border-color: var(--code-order-primary);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(100, 4, 183, 0);
        border-color: var(--code-order-primary);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(100, 4, 183, 0);
    }
}

.code-order-address-bar.is-spotlight .code-order-address-display {
    animation: code-order-address-pulse 2s infinite;
    border-color: var(--code-order-primary);
    background: #fff;
}

.code-order-address-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f7f7f7;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.3s ease;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.code-order-address-display:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.code-order-address-display.has-address {
    cursor: default;
    border-style: solid;
    border-color: #e0e0e0;
    background: #f7f7f7;
}

.code-order-address-icon {
    color: #585858;
    flex-shrink: 0;
}

.code-order-address-display.has-address .code-order-address-icon {
    color: var(--code-order-primary, #00b37e);
    display: none;
}

.code-order-address-display.has-address::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--code-order-primary, #00b37e);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 13l4 4L19 7' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: center;
}

.code-order-address-text {
    flex: 1;
    font-size: 13px;
    color: #585858;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.code-order-address-display:not(.has-address) .code-order-address-text {
    color: #e62222;
    font-weight: 500;
}

.code-order-address-display.has-address .code-order-address-text {
    color: #1a1a1a;
    font-weight: 400;
}

.code-order-address-change-btn {
    background: none;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--code-order-primary, #00b37e);
    cursor: pointer;
    border-radius: 6px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.code-order-address-change-btn:hover {
    background: rgba(0, 179, 126, 0.08);
}

.code-order-address-display:not(.has-address) .code-order-address-change-btn {
    background: var(--code-order-primary, #00b37e);
    color: #fff;
    padding: 5px 14px;
    border-radius: 6px;
}

.code-order-address-display:not(.has-address) .code-order-address-change-btn:hover {
    background: var(--code-order-primary-hover, #029e7d);
}

.code-order-address-form {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    /* align-items: flex-end; */
    max-width: 100%;
    box-sizing: border-box;
}

.code-order-address-fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 100%;
}

.code-order-addr-row {
    display: flex;
    gap: 6px;
    min-width: 0;
}

.code-order-addr-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 14px !important;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.code-order-addr-input:focus {
    border-color: var(--code-order-primary, #00b37e);
    box-shadow: 0 0 0 3px rgba(0, 179, 126, 0.08);
}

.code-order-addr-input.is-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.08);
}

.code-order-addr-input--zip {
    max-width: 110px;
    flex-shrink: 0;
}

.code-order-addr-input--city {
    flex: 1;
}

.code-order-addr-check-btn {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    background: var(--code-order-primary, #00b37e);
    color: var(--code-order-btn-text, #fff);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, opacity 0.15s ease;
    align-self: stretch;
}

.code-order-addr-check-btn:hover {
    background: var(--code-order-primary-hover, #029e7d);
}

.code-order-addr-check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Feedback */
.code-order-address-feedback {
    margin-top: 10px;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
}

.code-order-af--success {
    background: #f0faf6;
    color: #1a7a5c;
}

.code-order-af--warning {
    background: #fff8f0;
    color: #8a6d3b;
}

.code-order-af--error {
    background: #fef2f2;
    color: #c0392b;
}

.code-order-af-success,
.code-order-af-warning {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-order-af-success svg {
    color: var(--code-order-primary, #00b37e);
    flex-shrink: 0;
}

.code-order-af-warning svg {
    color: #e67e22;
    flex-shrink: 0;
}

.code-order-af-fee {
    margin-left: auto;
    font-weight: 600;
    white-space: nowrap;
}

.code-order-af-pickup-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.code-order-af-pickup-btn:hover {
    background: #333;
}

/*  Info Badges (inside card 2)  */
.code-order-info-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    /* Slightly more gap between badges */
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.code-order-info-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 8px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    min-width: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-order-info-badge:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--code-order-primary);
}

.code-order-info-badge-value {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.code-order-info-badge-icon {
    margin-bottom: 4px;
    color: var(--code-order-primary);
    line-height: 1;
    display: flex;
}

.code-order-info-badge-label {
    font-size: 11px;
    color: #555555;
    line-height: 1.3;
    margin-top: 2px;
}

/* Allergen disclaimer */
.code-order-allergen-notice {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #585858;
    line-height: 1.4;
}

.code-order-allergen-notice svg {
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.4;
}

/* ================================================================
   Uber-style Sticky Navbar (search + tabs)
   ================================================================ */
.code-order-menu-navbar {
    position: sticky;
    top: 0;
    z-index: 51;
    background: #fff;
    padding: 8px 10px;
    margin-top: 0px;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    transition: background 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease;
}

.code-order-menu-navbar.is-stuck {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 0;
    border-top-color: transparent;
}

/*  Top row: title + hours | search  */
.code-order-navbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px 14px;
}

.code-order-navbar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    min-width: 0;
}

.code-order-navbar-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.code-order-navbar-hours {
    font-size: 12px;
    color: #585858;
    line-height: 1.3;
    white-space: nowrap;
}

.code-order-navbar-search {
    flex: 0 1 320px;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.code-order-navbar-search .code-order-search-icon {
    position: absolute;
    left: 10px;
    color: #555555;
    pointer-events: none;
    transition: color 0.15s;
}

.code-order-navbar-search .code-order-search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    color: #1a1a1a;
    background: #f0f0f0;
    outline: none;
    transition: background 0.2s, box-shadow 0.2s;
}

.code-order-navbar-search .code-order-search-input::placeholder {
    color: #585858;
    font-weight: 400;
}

.code-order-navbar-search .code-order-search-input:focus {
    background: #fff;
    box-shadow: 0 0 0 1.5px var(--code-order-primary, #6f00ff);
}

.code-order-navbar-search:focus-within .code-order-search-icon {
    color: var(--code-order-primary);
}

/* No results */
.code-order-menu-no-results {
    text-align: center;
    color: #555555;
    font-size: 15px;
    padding: 48px 16px;
    margin: 0;
}

/*  Category tabs (underline style)  */
.code-order-navbar-tabs {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px 5px;
    margin: 0;
    scrollbar-width: none;
}

.code-order-navbar-tabs::-webkit-scrollbar {
    display: none;
}

.code-order-ntab {
    position: relative;
    padding: 10px 16px;
    border: none;
    background: none;
    text-decoration: none !important;
    color: #111111;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    border-radius: 8px;
    cursor: pointer;
}

.code-order-ntab:focus,
.code-order-ntab:active {
    outline: none;
    box-shadow: none;
    border: none;
}

.code-order-ntab::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -4px;
    height: 3px;
    background: transparent;
    border-radius: 3px;
    transition: all 0.25s ease;
    transform: scaleX(0);
}

.code-order-ntab:hover {
    color: #111111;
    background: rgba(0, 0, 0, 0.04);
}

.code-order-ntab.active {
    color: var(--code-order-primary, #6f00ff);
    background: transparent;
}

.code-order-ntab.active::after {
    background: var(--code-order-primary, #6f00ff);
    transform: scaleX(1);
}

/*  Sections  */
.code-order-menu-section {
    margin-bottom: 25px;
    scroll-margin-top: 120px;
    background: white;
    border-radius: 14px;
    padding: 25px;
}

.code-order-cat-header {
    text-align: center;
    margin-bottom: 20px;
}

.code-order-cat-parent {
    font-size: 11px;
    opacity: 0.55;
    text-transform: uppercase;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2px;
    display: block;
    letter-spacing: 0.05em;
}

.code-order-cat-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 15px !important;
    text-align: center;
    margin-top: 0;
    padding: 0;
    color: #1a1a1a;
    line-height: 1.1;
}

.code-order-cat-desc {
    color: #585858;
    font-size: 14px;
    margin-bottom: 16px;
}

/*  Grid & List  */
.code-order-menu-grid {
    display: grid;
    gap: 20px;
}

.code-order-menu-list {
    display: grid;
    /* Default to 1 column, but allow inline style to override */
    grid-template-columns: 1fr;
    gap: 14px;
}

/*  Card  */
.code-order-menu-card {
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.code-order-menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.code-order-menu-card--unavailable {
    opacity: 0.55;
}

.code-order-menu-card--paused {
    opacity: 0.75;
}

.code-order-menu-card-img-link img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.code-order-menu-card--list {
    flex-direction: row;
    display: flex;
    min-width: 0;
    /* Prevent horizontal overflow in narrow columns */
}

.code-order-menu-card--list .code-order-menu-card-img-link img {
    width: 120px;
    height: 100%;
    border-radius: 0;
}

.code-order-menu-card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.code-order-menu-card-title {
    margin: 0 !important;
    font-size: 16px;
    font-weight: 700;
}

.code-order-menu-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.code-order-menu-card-title a:hover {
    color: var(--code-order-primary);
}

.code-order-menu-card-desc {
    font-size: 14px !important;
    color: #585858;
    margin: 0;
    flex: 1;
}

.code-order-menu-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
}

.code-order-menu-card-price {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 15px;
}

.code-order-menu-unavailable {
    font-size: 12px;
    color: #555555;
    font-style: italic;
}

.code-order-menu-info-only {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
}

/* Carte (display-only) menu: cleaner, print-menu-like presentation */
.code-order-menu-wrap--catalog .code-order-menu-section {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.code-order-menu-wrap--catalog .code-order-menu-card {
    border: none;
    border-radius: 6px;
    box-shadow: none;
    padding: 14px 12px;
    margin: 0 0 10px;
    background: var(--bg-card, #ffffff);
}

.code-order-menu-wrap--catalog .code-order-menu-card:nth-child(odd) {
    background: var(--bg-secondary, #f3f4f6);
}

.code-order-menu-wrap--catalog .code-order-menu-card-img-link {
    display: none;
}

.code-order-menu-wrap--catalog .code-order-menu-card-body {
    padding: 0;
}

.code-order-menu-wrap--catalog .code-order-menu-card-title {
    font-size: 18px;
    line-height: 1.35;
    margin-bottom: 6px;
}

.code-order-menu-wrap--catalog .code-order-menu-card-desc {
    margin-bottom: 8px;
    color: var(--text-secondary, #4b5563);
}

.code-order-menu-wrap--catalog .code-order-menu-card-footer {
    justify-content: flex-end;
    padding-top: 0;
}

.code-order-menu-wrap--catalog .code-order-menu-card-price {
    font-size: 16px;
    min-width: 72px;
    text-align: right;
}

.code-order-menu-wrap--catalog .code-order-cat-parent {
    display: none;
}

.code-order-menu-wrap--catalog .code-order-menu-products {
    display: block !important;
}

.code-order-menu-wrap--catalog .code-order-carte-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.code-order-menu-wrap--catalog .code-order-carte-title {
    font-weight: 700;
    color: var(--text-primary, #111827);
}

.code-order-menu-wrap--catalog .code-order-carte-leader {
    flex: 1;
    border-bottom: 1px dotted var(--border-color, #9ca3af);
    transform: translateY(-2px);
}

.code-order-menu-wrap--catalog .code-order-carte-price {
    color: var(--text-primary, #111827);
    font-weight: 700;
    white-space: nowrap;
}

.code-order-menu-wrap--catalog .code-order-carte-price .amount {
    font-weight: 700;
}

.code-order-menu-wrap--catalog .code-order-carte-price .woocommerce-price-suffix,
.code-order-menu-wrap--catalog .code-order-carte-price .tax_label {
    display: none !important;
}

.code-order-menu-wrap--catalog .code-order-carte-desc {
    margin: 8px 0 0;
    color: var(--text-secondary, #6b7280);
    font-style: italic;
    font-size: 14px;
}

html[data-theme="dark"] .code-order-menu-wrap--catalog .code-order-menu-card {
    background: var(--bg-tertiary, #111112);
    border-color: var(--border-color, #2c2c2e);
}

html[data-theme="dark"] .code-order-menu-wrap--catalog .code-order-menu-card:nth-child(odd) {
    background: var(--bg-card, #141416);
}

html[data-theme="dark"] .code-order-menu-wrap--catalog .code-order-carte-title,
html[data-theme="dark"] .code-order-menu-wrap--catalog .code-order-carte-price {
    color: var(--text-primary, #f5f5f7);
}

html[data-theme="dark"] .code-order-menu-wrap--catalog .code-order-carte-desc {
    color: var(--text-secondary, #a1a1a6);
}

/*  Action button  */
.code-order-menu-add-btn {
    background: var(--code-order-primary, #6f00ff);
    color: var(--code-order-btn-text, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.code-order-menu-add-btn:hover {
    background: var(--code-order-primary-hover, #029e7d);
    color: var(--code-order-btn-text, #ffffff);
}

.code-order-menu-add-btn.is-success {
    background: #22863a;
}

.code-order-menu-add-btn.is-error {
    background: #e53e3e;
}

/* ================================================================
   Options Drawer
   ================================================================ */
.code-order-options-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-order-options-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.code-order-options-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(600px, 100vw);
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 16px 40px rgba(0, 0, 0, 0.1);
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
        visibility 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.code-order-options-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

/* Header */
.code-order-options-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.code-order-options-drawer-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.code-order-options-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #555555;
    padding: 0 2px;
    transition: color 0.15s;
}

.code-order-options-close:hover {
    color: #333;
}

/* Body */
.code-order-options-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    overflow-x: hidden;
}

.code-order-options-drawer-body::-webkit-scrollbar {
    width: 3px;
}

.code-order-options-drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.code-order-options-drawer-body::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 3px;
}

/* Footer */
.code-order-options-drawer-footer {
    padding: 18px 24px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.code-order-options-add-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.15s;
    background: var(--code-order-primary, #6f00ff);
    color: var(--code-order-btn-text, #ffffff);
}

.code-order-options-add-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.code-order-options-add-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Loading State */
#code-order-check-address:disabled {
    opacity: 0.8;
    cursor: wait;
    background: #e5e7eb;
    color: #6b7280;
}

#code-order-check-address:disabled::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #6b7280;
    border-top-color: transparent;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    animation: code-order-spin 0.6s linear infinite;
}

@keyframes code-order-spin {
    to {
        transform: rotate(360deg);
    }
}

.code-order-options-add-btn.is-error {
    background: #e53e3e;
    opacity: 1;
}

/* Loading */
.code-order-options-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.code-order-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #eee;
    border-top-color: var(--code-order-primary);
    border-radius: 50%;
    animation: code-order-spin 0.7s linear infinite;
}

@keyframes code-order-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error */
.code-order-options-error {
    text-align: center;
    color: #bbb;
    padding: 40px 0;
    font-size: 14px;
}

/*  Product hero  */
.code-order-options-product {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.code-order-options-hero img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}

.code-order-options-info {
    flex: 1;
}

.code-order-options-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.code-order-options-price {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.code-order-options-desc {
    font-size: 13px;
    color: #585858;
    margin: 6px 0 0;
    line-height: 1.45;
}

.code-order-options-desc ul,
.code-order-options-desc ol {
    margin: 6px 0 0;
    padding-left: 18px;
}

.code-order-options-desc li {
    margin: 2px 0;
}

.code-order-options-desc.is-collapsed {
    max-height: 88px;
    overflow: hidden;
    position: relative;
}

.code-order-options-desc.is-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
    pointer-events: none;
}

.code-order-options-desc-toggle {
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6f00ff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.code-order-options-desc-toggle:hover {
    color: #029a7b;
    text-decoration: underline;
}

/* ================================================================
   Add-on Fields (shared: product page + drawer)
   ================================================================ */
.code-order-addons-wrap {
    margin: 16px 0;
}

.code-order-options-fields .code-order-addons-wrap {
    margin: 0;
}

.code-order-addon-group {
    margin-bottom: 24px;
}

.code-order-addon-label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.code-order-addon-label strong {
    font-weight: 700;
}

.code-order-addon-desc {
    font-size: 13px;
    color: #585858;
    margin: -6px 0 10px;
    line-height: 1.45;
}

.code-order-req {
    color: #e53e3e;
    font-weight: 400;
}

.code-order-addon-max {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #777;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 4px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.code-order-addon-max.is-warn {
    color: #fff;
    background: #e53e3e;
    animation: code-order-shake 0.4s ease;
}

@keyframes code-order-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-3px);
    }

    40% {
        transform: translateX(3px);
    }

    60% {
        transform: translateX(-2px);
    }

    80% {
        transform: translateX(2px);
    }
}

.code-order-addon-hint {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #585858;
    margin-top: 2px;
    line-height: 1.4;
}

.code-order-addon-invalid>.code-order-addon-label {
    color: #e53e3e;
}

.code-order-addon-invalid>.code-order-addon-option:first-of-type {
    border-color: #e53e3e;
}

.code-order-addon-invalid>.code-order-addon-option {
    border-left-color: #e53e3e;
    border-right-color: #e53e3e;
}

.code-order-addon-invalid>.code-order-addon-option:last-of-type {
    border-bottom-color: #e53e3e !important;
}

.code-order-addon-invalid>select,
.code-order-addon-invalid>input,
.code-order-addon-invalid>textarea {
    border-color: #e53e3e;
}

/*  Radio & Checkbox options  */
.code-order-addon-group>.code-order-addon-option:first-of-type {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.code-order-addon-group>.code-order-addon-option:last-of-type {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-bottom: 1px solid #e8e8e8;
}

.code-order-addon-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 0;
    border: 1px solid #e8e8e8;
    border-bottom: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
    background: #fafafa;
    transition: background 0.15s;
    line-height: 1.4;
    position: relative;
}

.code-order-addon-option:hover {
    background: #f4f4f4;
}

.code-order-addon-option:has(input:checked) {
    background: #f4f4f4;
}

.code-order-addon-option input[type="radio"],
.code-order-addon-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 0;
    height: 0;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    margin: 0;
}

.code-order-addon-option-indicator {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.code-order-addon-option-indicator--color {
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
}

.code-order-addon-option-label {
    flex: 1;
    min-width: 0;
    font-size: 14px;
}

.code-order-addon-option-price {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #585858;
    white-space: nowrap;
}

.code-order-addon-option:has(input:checked) .code-order-addon-option-price {
    color: #555;
}

.code-order-addon-option::after {
    content: '';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 13l4 4L19 7' stroke='%23ccc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.code-order-addon-option:has(input:checked)::after {
    opacity: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 13l4 4L19 7' stroke='%2302B893' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/*  Select  */
.code-order-addon-group select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fafafa;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.code-order-addon-group select:focus {
    border-color: var(--code-order-primary);
    background: #fff;
}

/*  Text & Textarea  */
.code-order-addon-text,
.code-order-addon-textarea,
.code-order-addon-qty {
    width: stretch;
    max-width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 13px 11px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fafafa;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.code-order-addon-text:focus,
.code-order-addon-textarea:focus,
.code-order-addon-qty:focus {
    border-color: var(--code-order-primary);
    background: #fff;
}

.code-order-addon-textarea {
    resize: vertical;
    min-height: 50px;
}

.code-order-addon-qty {
    max-width: 120px;
}

/*  Add-on Stepper (Quantity)  */
.code-order-addon-stepper-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin: 0;
    border: 1px solid #e8e8e8;
    border-bottom: none;
    border-radius: 0;
    background: #fafafa;
    transition: background 0.15s;
}

.code-order-addon-group>.code-order-addon-stepper-row:first-of-type {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.code-order-addon-group>.code-order-addon-stepper-row:last-of-type {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-bottom: 1px solid #e8e8e8;
}

.code-order-addon-stepper-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.code-order-addon-stepper-control {
    display: inline-flex;
    align-items: center;
    background: transparent;
    gap: 8px;
    /* space between - button, number, and + button */
}

.code-order-stepper-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 400;
    transition: all 0.15s ease;
    line-height: 1;
    flex-shrink: 0;
}

.code-order-stepper-minus {
    background: #f4f4f5;
    border: none;
    color: #000;
}

.code-order-stepper-plus {
    background: #f4f4f5;
    /* Light gray */
    border: none;
    color: #000;
}

.code-order-stepper-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    background: transparent !important;
}

.code-order-stepper-btn:not([disabled]):hover {
    transform: scale(1.05);
}

.code-order-stepper-input {
    width: 24px !important;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 0;
    border: none;
    background: transparent;
    appearance: textfield;
    -moz-appearance: textfield;
}

.code-order-stepper-input::-webkit-outer-spin-button,
.code-order-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Visual swatches  */
.code-order-addon-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.code-order-addon-swatch {
    cursor: pointer;
    margin: 0;
}

.code-order-addon-swatch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.code-order-swatch-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 52px;
    text-align: center;
    background: #fff;
}

.code-order-addon-swatch input:checked+.code-order-swatch-box {
    border-color: var(--code-order-primary);
    box-shadow: 0 0 0 1px var(--code-order-primary);
}

.code-order-addon-swatch:hover .code-order-swatch-box {
    border-color: #bbb;
}

.code-order-swatch-color {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.code-order-swatch-box img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.code-order-swatch-label {
    font-size: 11px;
    line-height: 1.3;
    color: #555;
    max-width: 72px;
    word-break: break-word;
}

/* ================================================================
   FAQ Section
   ================================================================ */
.code-order-faq-section {
    margin: 0;
    padding: 32px;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    max-width: 100%;
    margin-left: 0 !important;
    background: #fff;
    margin-right: 0 !important;
}

.code-order-faq-heading {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.code-order-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* FAQ item (accordion) */
details.code-order-faq-item {
    border-bottom: 1px solid #f0f0f0;
}

details.code-order-faq-item:first-child {
    border-top: 1px solid #f0f0f0;
}

details.code-order-faq-item[open] {
    padding-bottom: 4px;
}

.code-order-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    list-style: none;
    user-select: none;
    line-height: 1.4;
}

.code-order-faq-question::-webkit-details-marker {
    display: none;
}

.code-order-faq-question::after {
    content: '';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-left: 16px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23999' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s;
}

details.code-order-faq-item[open]>.code-order-faq-question::after {
    transform: rotate(45deg);
}

.code-order-faq-answer {
    padding: 0 0 12px;
    font-size: 14px;
    color: #585858;
    line-height: 1.6;
}

.code-order-faq-answer p {
    margin: 0 0 8px;
}

.code-order-faq-answer p:last-child {
    margin-bottom: 0;
}

/* Store Map */
.code-order-store-map {
    width: 100%;
    margin-top: 12px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.code-order-store-map:empty {
    display: none;
}

.code-order-store-map img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.code-order-store-map__loading {
    padding: 40px;
    text-align: center;
    font-size: 14px;
    background: #f8f9fa;
    color: #585858;
}

.code-order-store-map__loading-icon {
    display: inline-block;
    margin-bottom: 8px;
    animation: code-order-store-map-spin 1s linear infinite;
    vertical-align: middle;
    color: currentColor;
}

@keyframes code-order-store-map-spin {
    to {
        transform: rotate(360deg);
    }
}

.code-order-map-warning {
    padding: 12px 16px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

/*  Utilities  */
body.code-order-no-scroll {
    overflow: hidden;
}

/*  Responsive  */
@media (max-width: 992px) {

    .code-order-menu-grid,
    .code-order-menu-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    }

    .code-order-store-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .code-order-sh-card-inner {
        padding: 14px 16px;
    }

    .code-order-store-name {
        font-size: 20px;
    }

    .code-order-address-form {
        flex-direction: column;
    }

    .code-order-addr-check-btn {
        align-self: stretch;
    }

    .code-order-addr-input--zip {
        max-width: none;
        flex-shrink: 1;
    }

    .code-order-addr-row {
        flex-wrap: wrap;
    }

    .code-order-menu-navbar {
        margin-bottom: -20px;
    }

    .code-order-navbar-top {
        padding: 12px 16px 0;
    }

    .code-order-navbar-tabs {
        padding: 0 16px;
    }

    .code-order-navbar-tabs::after {
        content: '';
        flex-shrink: 0;
        width: 1px;
    }
}

@media (max-width: 600px) {
    .code-order-store-header {
        gap: 16px;
        padding: 16px 0 14px;
    }

    .code-order-store-name {
        font-size: 18px;
    }

    .code-order-store-meta {
        font-size: 12px;
        gap: 6px;
    }

    .code-order-sh-card-inner {
        padding: 12px 14px;
    }

    .code-order-sh-card {
        border-radius: 12px;
    }

    .code-order-info-badge {
        padding: 10px 4px;
    }

    .code-order-info-badge-value {
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .code-order-info-badge-label {
        font-size: 10px;
    }

    .code-order-allergen-notice {
        font-size: 10px;
    }

    .code-order-service-btn {
        padding: 7px 8px;
        font-size: 12px;
        min-height: 42px;
    }

    .code-order-service-zone-hint {
        font-size: 12px;
        padding: 9px 10px;
    }

    .code-order-address-display {
        padding: 8px 10px;
        gap: 6px;
    }

    .code-order-address-text {
        font-size: 12px;
    }

    .code-order-address-change-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .code-order-addr-input {
        padding: 8px 10px;
        font-size: 13px;
    }

    .code-order-addr-check-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .code-order-hours-modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 48px);
        border-radius: 14px;
    }

    .code-order-hours-modal-header {
        padding: 14px 16px;
    }

    .code-order-hours-modal-body {
        padding: 16px;
    }

    .code-order-schedule-row {
        padding: 5px 6px;
        font-size: 12px;
    }

    .code-order-schedule-day {
        min-width: 70px;
    }

    .code-order-faq-heading {
        font-size: 18px;
    }

    .code-order-faq-question {
        font-size: 14px;
        padding: 14px 0;
    }

    .code-order-faq-answer {
        font-size: 13px;
    }

    .code-order-faq-section {
        margin-top: 32px;
        padding-top: 24px;
    }

    .code-order-menu-grid,
    .code-order-menu-list {
        grid-template-columns: 1fr !important;
    }

    .code-order-menu-card--list {
        flex-direction: column;
        /* Stack image on top for mobile list view */
    }

    .code-order-menu-card--list .code-order-menu-card-img-link {
        width: 100% !important;
        height: 180px !important;
    }

    .code-order-menu-card--list {
        flex-direction: column;
    }

    .code-order-menu-card--list .code-order-menu-card-img-link img {
        width: 100%;
        height: 180px;
    }

    .code-order-options-drawer-header {
        padding: 14px 16px;
    }

    .code-order-options-drawer-body {
        padding: 16px;
    }

    .code-order-options-drawer-footer {
        padding: 12px 16px;
    }

    .code-order-navbar-top {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 10px 14px 0;
    }

    .code-order-navbar-info {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
    }

    .code-order-navbar-search {
        flex: 1 1 100%;
    }

    .code-order-navbar-title {
        font-size: 14px;
    }

    .code-order-navbar-hours {
        font-size: 11px;
    }

    .code-order-navbar-search .code-order-search-input {
        padding: 8px 10px 8px 32px;
        font-size: 13px;
    }

    .code-order-navbar-tabs {
        padding: 12px 14px;
    }

    .code-order-ntab {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Prevent mobile auto-zoom on inputs (iOS triggers zoom if < 16px) */
@media (max-width: 768px) {

    .code-order-addr-input,
    .code-order-search-input,
    .code-order-addon-text,
    .code-order-addon-textarea,
    .code-order-addon-qty,
    .code-order-addon-group select,
    .code-order-stepper-input,
    .code-order-navbar-search .code-order-search-input {
        font-size: 16px !important;
    }
}

.code-order-service-switch-feedback {
    display: none;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

/* ── Address Modal — Mobile ── */
@media (max-width: 480px) {
    .code-order-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .code-order-modal-content {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 88vh;
        transform: translateY(100%);
    }

    .code-order-modal-overlay.is-open .code-order-modal-content {
        transform: translateY(0);
    }

    .code-order-service-switch-header {
        grid-template-columns: 40px minmax(0, 1fr) 30px;
        gap: 11px;
        padding: 21px 20px 16px;
    }

    .code-order-service-switch-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .code-order-service-switch-body {
        padding: 0 20px 18px;
    }

    .code-order-service-switch-actions {
        padding: 14px 20px calc(18px + env(safe-area-inset-bottom, 0px));
    }

    .code-order-service-switch-btn {
        flex: 1 1 0;
        padding-left: 10px;
        padding-right: 10px;
    }

    .code-order-modal-steps,
    .code-order-modal-header,
    .code-order-modal-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .code-order-form-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}
