/**
 * 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: -10px;
}

/* 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-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-see-hours-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--code-order-primary);
    cursor: pointer;
    transition: opacity 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-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    padding: 8px 14px;
    border: none;
    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;
    white-space: nowrap;
    line-height: 1;
}

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

.code-order-service-btn.is-active {
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.code-order-service-btn.code-order-service-btn--paused {
    opacity: 0.6;
    color: #555555;
}

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

.code-order-service-btn.code-order-service-btn--unavailable {
    opacity: 0.55;
    cursor: not-allowed;
    color: #7a7a7a;
}

.code-order-service-btn.code-order-service-btn--unavailable svg {
    color: #7a7a7a;
}

/* 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: 10000;
    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);
}

/* 
   Address Modal
    */
.code-order-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

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

.code-order-modal-content {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

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

.code-order-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
}

.code-order-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}

/* Visibility based on step - More specific */
.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: 6px 0 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.code-order-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #4b5563;
    transition: all 0.2s ease;
}

.code-order-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.code-order-modal-body {
    padding: 24px 28px;
}

.code-order-modal-footer {
    padding: 20px 28px 28px;
    border-top: 1px solid #f3f4f6;
}

.code-order-step-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Form Styles */
.code-order-form-group {
    margin-bottom: 10px;
    position: relative;
}

.code-order-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    padding-left: 2px;
}

.code-order-input-with-icon {
    position: relative;
    width: 100%;
}

.code-order-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    pointer-events: none;
    z-index: 2;
    /* Ensure on top */
    width: 20px;
    height: 20px;
}

.code-order-input-with-icon input {
    width: 100%;
    padding: 14px 16px 14px 48px !important;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #111827;
    height: 52px;
    /* Consistent height */
}

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

.code-order-input-with-icon input:focus {
    outline: none;
    border-color: var(--code-order-primary);
    box-shadow: 0 0 0 4px rgba(var(--code-order-primary-rgb, 100, 4, 183), 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.code-order-form-row {
    display: grid;
    grid-template-columns: 1fr 2.1fr;
    /* Adjust ratios */
    gap: 2px;
    margin-bottom: 12px;
}

.code-order-check-address-btn {
    width: 100%;
    padding: 14px;
    background: var(--code-order-primary);
    color: var(--code-order-btn-text);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-order-check-address-btn:hover {
    background: var(--code-order-primary-hover);
    transform: translateY(-1px);
}

.code-order-modal-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

/* Location List in Modal */
.code-order-location-list {
    margin-top: 20px;
    border-top: 1px solid #f3f4f6;
    padding-top: 20px;
}

.code-order-location-list h4 {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.code-order-location-item {
    padding: 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
}

.code-order-location-item:hover {
    border-color: var(--code-order-primary);
    background: #fdfaff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.code-order-location-item.is-current {
    border-color: var(--code-order-primary);
    background: #fdfaff;
    box-shadow: 0 4px 12px -2px rgba(var(--code-order-primary-rgb, 100, 4, 183), 0.08);
}

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

.code-order-location-item.status-unavailable:hover,
.code-order-location-item.status-closed:hover {
    transform: none;
    box-shadow: none;
    border-color: #e5e7eb;
}

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

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

.code-order-modal-content[data-step="1"] .code-order-step-branches {
    display: none;
    opacity: 0;
    transform: translateX(20px);
}

.code-order-modal-content[data-step="2"] .code-order-step-address {
    display: none;
    opacity: 0;
    transform: translateX(-20px);
}

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

/* Step 2 Header & Summary */
.code-order-step-2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e5e7eb;
}

.code-order-step-2-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.code-order-selected-address-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.code-order-sas-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 8px;
    color: var(--code-order-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.code-order-sas-icon svg {
    display: block;
}

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

.code-order-sas-addr {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.code-order-sas-edit {
    font-size: 12px;
    font-weight: 600;
    color: var(--code-order-primary);
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.code-order-sas-edit:hover {
    background: #f8fafc;
    border-color: var(--code-order-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.code-order-sas-edit:active {
    transform: translateY(0);
}

/* Modern Branch Item */
.code-order-location-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
}

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

.code-order-location-item.is-current {
    border-color: #22c55e;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.08);
}

.code-order-li-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.code-order-li-title {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
}

.code-order-li-msg {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.code-order-li-fee {
    font-size: 12px;
    color: #4b5563;
    margin-top: 2px;
}

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

.code-order-li-select-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.code-order-location-item:hover .code-order-li-select-indicator {
    opacity: 1;
}

@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.7;
}

.code-order-location-item.is-loading::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 0;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
    width: 18px;
    height: 18px;
    border: 2px solid #eee;
    border-top-color: var(--code-order-primary);
    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(230, 34, 34, 0.4);
        border-color: #e62222;
    }

    70% {
        box-shadow: 0 0 0 10px rgba(230, 34, 34, 0);
        border-color: #e62222;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(230, 34, 34, 0);
        border-color: #e62222;
    }
}

.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);
    color: var(--code-order-btn-text);
    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 14px;
    border: none;
    background: none;
    text-decoration: none;
    color: #585858;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

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

.code-order-ntab::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 2px;
    background: transparent;
    border-radius: 2px;
    transition: background 0.2s;
}

.code-order-ntab:hover {
    color: #555;
}

.code-order-ntab.active {
    color: var(--code-order-primary);
}

.code-order-ntab.active::after {
    background: var(--code-order-primary);
}

/*  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;
    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;
    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;
}

/*  Action button  */
.code-order-menu-add-btn {
    background: var(--code-order-primary);
    color: var(--code-order-btn-text);
    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);
    color: var(--code-order-btn-text);
}

.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);
    color: var(--code-order-btn-text);
}

.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-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 10px;
        font-size: 12px;
    }

    .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 #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}