/* ==========================================================================
   FioriOnline24 PWA - Core Styles, Navigation Bar, Funnel & Drawers
   ========================================================================== */

:root {
    --fo24-pwa-primary: #008751;
    --fo24-pwa-primary-hover: #00683e;
    --fo24-pwa-gold: #c5a059;
    --fo24-pwa-text: #1f2937;
    --fo24-pwa-text-muted: #6b7280;
    --fo24-pwa-border: rgba(0, 0, 0, 0.08);
    --fo24-pwa-nav-height: 58px;
    --fo24-safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* --------------------------------------------------------------------------
   1. Bottom Navigation Bar Container & Responsive Rules
   -------------------------------------------------------------------------- */
.fo24-pwa-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--fo24-pwa-border);
    box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.06);
    padding-bottom: var(--fo24-safe-area-bottom);
    height: calc(var(--fo24-pwa-nav-height) + var(--fo24-safe-area-bottom));
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

@media (min-width: 1024px) {
    .fo24-pwa-bottom-nav,
    .fo24-pwa-drawer,
    .fo24-pwa-prospect-drawer {
        display: none !important;
    }
}

.fo24-pwa-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--fo24-pwa-nav-height);
    max-width: 500px;
    margin: 0 auto;
    padding: 0 4px;
}

/* --------------------------------------------------------------------------
   2. Nav Items (Pulsanti & Tab)
   -------------------------------------------------------------------------- */
.fo24-pwa-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    text-decoration: none;
    color: var(--fo24-pwa-text-muted);
    font-family: inherit;
    cursor: pointer;
    position: relative;
    padding: 4px 2px 2px;
    transition: color 0.18s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.fo24-pwa-nav-item:active {
    transform: scale(0.92);
}

.fo24-pwa-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-bottom: 2px;
}

.fo24-pwa-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.18s ease;
}

.fo24-pwa-label {
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: font-weight 0.18s ease;
}

/* Tab Attiva */
.fo24-pwa-nav-item.is-active {
    color: var(--fo24-pwa-primary) !important;
}

.fo24-pwa-nav-item.is-active .fo24-pwa-icon {
    transform: scale(1.1);
    stroke: var(--fo24-pwa-primary);
}

.fo24-pwa-nav-item.is-active .fo24-pwa-label {
    font-weight: 700;
}

/* Tab WhatsApp con accento verde */
.fo24-pwa-whatsapp-item .fo24-wa-svg {
    fill: #25D366;
}

/* Badge Notifica Ordini Attivi da localStorage */
.fo24-pwa-badge {
    position: absolute;
    top: -3px;
    right: -8px;
    background: #FF5733;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(255, 87, 51, 0.4);
    animation: fo24PulseBadge 2.4s infinite;
}

@keyframes fo24PulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* --------------------------------------------------------------------------
   3. Body Padding & Safe Area Inset
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    body:not(.woocommerce-checkout) {
        padding-bottom: calc(var(--fo24-pwa-nav-height) + var(--fo24-safe-area-bottom) + 8px) !important;
    }
}

/* --------------------------------------------------------------------------
   4. Isolamento Tassativo Checkout (Zero Interferenze Form & Spese)
   -------------------------------------------------------------------------- */
body.woocommerce-checkout:not(.woocommerce-order-received) .fo24-pwa-bottom-nav,
body.woocommerce-checkout:not(.woocommerce-order-received) #fo24-pwa-bottom-nav,
body.woocommerce-checkout:not(.woocommerce-order-received) .fo24-pwa-drawer,
body.woocommerce-checkout:not(.woocommerce-order-received) .fo24-pwa-prospect-drawer {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received) {
    padding-bottom: 0 !important;
}

/* --------------------------------------------------------------------------
   5. Coordinamento Z-Index & Risoluzione Conflitti Widget (WhatsApp, Cookie Trigger, Reviews)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    /* Disabilita il floating button WhatsApp di terze parti: la bottom nav ha già la tab 'Assistenza' */
    #ht-ctc-chat,
    .ht-ctc,
    .ht-ctc-chat,
    .ht_ctc_chat_data,
    .ht_ctc_mobile {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* Riposiziona il trigger del cookie banner sopra la bottom nav per non coprire Home o Occasioni */
    #fiorionline-cookie-trigger {
        bottom: calc(var(--fo24-pwa-nav-height) + var(--fo24-safe-area-bottom) + 12px) !important;
        left: 12px !important;
        z-index: 1040 !important;
    }

    /* Nascondi il trigger cookie quando un drawer/sheet è aperto */
    .fo24-pwa-drawer.is-open ~ #fiorionline-cookie-trigger,
    body.fo24-drawer-open #fiorionline-cookie-trigger,
    .fo24-pwa-sheet.is-open ~ #fiorionline-cookie-trigger {
        display: none !important;
    }

    iframe[id*="merchant"],
    div[id*="merchantWidget"],
    div[id*="merchant"],
    .grecaptcha-badge {
        bottom: calc(var(--fo24-pwa-nav-height) + var(--fo24-safe-area-bottom) + 8px) !important;
        right: 10px !important;
        z-index: 1040 !important;
        transform: scale(0.85);
        transform-origin: bottom right;
    }
}

/* --------------------------------------------------------------------------
   6. Drawer Occasioni & Promozioni
   -------------------------------------------------------------------------- */
.fo24-pwa-drawer {
    position: fixed;
    inset: 0;
    z-index: 2090;
    display: none;
}

.fo24-pwa-drawer.is-open {
    display: block;
}

.fo24-pwa-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.fo24-pwa-drawer-content {
    position: absolute;
    bottom: calc(var(--fo24-pwa-nav-height) + var(--fo24-safe-area-bottom));
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
    padding: 18px 20px;
    max-height: 75vh;
    overflow-y: auto;
    animation: fo24SlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fo24SlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.fo24-pwa-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.fo24-pwa-drawer-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.fo24-pwa-drawer-close {
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
}

.fo24-pwa-drawer-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fo24-pwa-cat-link {
    display: block;
    padding: 11px 14px;
    background: #f9fafb;
    border-radius: 10px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.fo24-pwa-cat-link:active {
    background: #e8f5e9;
    color: var(--fo24-pwa-primary);
}

.fo24-pwa-cat-all {
    text-align: center;
    background: transparent;
    border: 1px solid #e5e7eb;
    color: var(--fo24-pwa-primary);
    font-weight: 600;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   7. Promozioni Card & Coupon 1-Clic
   -------------------------------------------------------------------------- */
.fo24-pwa-promo-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 2px dashed #008751;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    margin-bottom: 8px;
}

.fo24-pwa-promo-badge {
    display: inline-block;
    background: #008751;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.fo24-pwa-promo-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.fo24-pwa-promo-code-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 auto 10px auto;
    max-width: 240px;
}

.fo24-pwa-code-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #008751;
    font-family: monospace;
}

.fo24-pwa-copy-btn {
    background: #008751;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.fo24-pwa-copy-btn:active {
    background: #00683e;
}

.fo24-pwa-promo-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 12px;
}

.fo24-pwa-apply-coupon-btn {
    display: block;
    width: 100%;
    background: #008751;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.fo24-pwa-apply-coupon-btn:active {
    background: #00683e;
    transform: scale(0.98);
}

.fo24-pwa-benefits-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.fo24-pwa-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 10px;
}

.fo24-pwa-benefit-icon {
    font-size: 20px;
    line-height: 1;
}

.fo24-pwa-benefit-item strong {
    display: block;
    font-size: 13px;
    color: #111827;
    margin-bottom: 2px;
}

.fo24-pwa-benefit-item p {
    font-size: 11.5px;
    color: #6b7280;
    margin: 0;
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   8. Prospect Smart Banner / Bottom Drawer
   -------------------------------------------------------------------------- */
.fo24-pwa-prospect-drawer {
    position: fixed;
    bottom: calc(var(--fo24-pwa-nav-height) + var(--fo24-safe-area-bottom) + 8px);
    left: 12px;
    right: 12px;
    z-index: 1045;
    animation: fo24SlideUpBanner 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fo24SlideUpBanner {
    from { transform: translateY(120%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fo24-pwa-prospect-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    padding: 14px 16px;
    position: relative;
    max-width: 460px;
    margin: 0 auto;
}

.fo24-pwa-prospect-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.fo24-pwa-prospect-body {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.fo24-pwa-prospect-logo-wrap {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: #008751;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 135, 81, 0.25);
}

.fo24-pwa-prospect-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fo24-pwa-prospect-text {
    flex: 1;
    min-width: 0;
}

.fo24-pwa-prospect-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.fo24-pwa-prospect-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.3;
}

.fo24-pwa-prospect-tags {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.fo24-pwa-tag {
    font-size: 10px;
    background: #f0fdf4;
    color: #008751;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #bbf7d0;
}

.fo24-pwa-prospect-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fo24-pwa-btn-install {
    flex: 1;
    background: #008751;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 135, 81, 0.2);
    transition: background 0.15s, transform 0.1s;
}

.fo24-pwa-btn-install:active {
    background: #00683e;
    transform: scale(0.97);
}

.fo24-pwa-btn-dismiss {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   9. Modale Istruzioni iOS Safari
   -------------------------------------------------------------------------- */
.fo24-pwa-ios-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fo24FadeIn 0.2s ease-out;
}

@keyframes fo24FadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fo24-pwa-ios-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 20px;
    max-width: 360px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.fo24-pwa-ios-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
}

.fo24-pwa-ios-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin: 0 auto 10px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 135, 81, 0.25);
}

.fo24-pwa-ios-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.fo24-pwa-ios-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.fo24-pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 20px;
}

.fo24-pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 12px;
}

.fo24-pwa-ios-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 9999px;
    background: #008751;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fo24-pwa-ios-step-text {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.35;
}

.fo24-ios-share-icon,
.fo24-ios-add-icon {
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
    color: #0284c7;
}

.fo24-pwa-ios-confirm-btn {
    display: block;
    width: 100%;
    background: #008751;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   10. Thank You Priority Card (`woocommerce_thankyou`)
   -------------------------------------------------------------------------- */
.fo24-pwa-thankyou-card {
    margin: 16px 0 24px 0;
    padding: 22px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 2px solid #008751;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 135, 81, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fo24-thankyou-header {
    margin-bottom: 18px;
}

.fo24-thankyou-badge {
    display: inline-block;
    background: #008751;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.fo24-thankyou-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 6px 0;
}

.fo24-thankyou-sub {
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
    margin: 0;
}

/* Timeline 5 Step */
.fo24-thankyou-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 22px 0;
    padding: 12px 6px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.fo24-tl-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.fo24-tl-node {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.fo24-tl-step.is-done .fo24-tl-node {
    background: #008751;
    border-color: #008751;
    color: #ffffff;
}

.fo24-tl-step.is-active .fo24-tl-node {
    background: #ffffff;
    border-color: #008751;
    color: #008751;
    box-shadow: 0 0 0 3px rgba(0, 135, 81, 0.2);
}

.fo24-tl-step.is-photo .fo24-tl-node {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #d97706;
}

.fo24-tl-label {
    font-size: 9.5px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.15;
}

.fo24-tl-step.is-done .fo24-tl-label,
.fo24-tl-step.is-active .fo24-tl-label {
    color: #0f172a;
    font-weight: 700;
}

.fo24-tl-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 -4px 14px -4px;
    position: relative;
    z-index: 0;
}

.fo24-tl-line.is-active {
    background: #008751;
}

/* Azioni Thank You */
.fo24-thankyou-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fo24-btn-pwa-install,
.fo24-btn-pwa-live {
    display: block;
    width: 100%;
    background: #008751;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 135, 81, 0.25);
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}

.fo24-btn-pwa-install:active,
.fo24-btn-pwa-live:active {
    background: #00683e;
    transform: scale(0.98);
}

.fo24-btn-pwa-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #25D366;
    color: #ffffff !important;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.2);
    transition: background 0.15s, transform 0.1s;
}

.fo24-btn-pwa-wa:active {
    background: #1eb956;
    transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   11. Toast Feedback Notifications
   -------------------------------------------------------------------------- */
.fo24-pwa-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fo24-pwa-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   12. Orders Sheet, Live Timeline & Photo Viewer Modal
   -------------------------------------------------------------------------- */
.fo24-orders-search-box {
    background: #f8fafc;
    border: 1px solid var(--fo24-pwa-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}
.fo24-orders-search-box h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--fo24-pwa-text);
}
.fo24-search-desc {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: var(--fo24-pwa-text-muted);
}
.fo24-order-form .fo24-form-group {
    margin-bottom: 10px;
}
.fo24-order-form label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--fo24-pwa-text);
}
.fo24-order-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    background: #fff;
    outline: none;
    box-sizing: border-box;
}
.fo24-order-form input:focus {
    border-color: var(--fo24-pwa-primary);
}
.fo24-btn-search-order {
    width: 100%;
    background: var(--fo24-pwa-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s;
}
.fo24-btn-search-order:active {
    background: var(--fo24-pwa-primary-hover);
}
.fo24-error-box {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 12px;
    border-radius: 6px;
}
.fo24-saved-orders-wrap h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 10px 0;
}
.fo24-order-card {
    background: #fff;
    border: 1px solid var(--fo24-pwa-border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.fo24-oc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.fo24-oc-num {
    font-weight: 700;
    font-size: 14px;
    color: var(--fo24-pwa-text);
}
.fo24-oc-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}
.fo24-oc-badge.is-active {
    background: #ecfdf5;
    color: #065f46;
}
.fo24-oc-badge.is-delivered {
    background: #f1f5f9;
    color: #475569;
}
.fo24-oc-body {
    font-size: 12.5px;
    color: var(--fo24-pwa-text-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}
.fo24-btn-view-order {
    background: transparent;
    border: 1px solid var(--fo24-pwa-primary);
    color: var(--fo24-pwa-primary);
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    width: 100%;
}
.fo24-order-detail-wrap .fo24-detail-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.fo24-btn-back {
    background: none;
    border: none;
    color: var(--fo24-pwa-primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}
.fo24-detail-badge {
    font-weight: 700;
    font-size: 14px;
}
.fo24-pwa-timeline-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}
.fo24-tl-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}
.fo24-tl-bullet {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fo24-tl-row.is-done .fo24-tl-bullet {
    background: var(--fo24-pwa-primary);
    color: #fff;
}
.fo24-tl-row.is-current .fo24-tl-bullet {
    box-shadow: 0 0 0 3px rgba(0, 135, 81, 0.25);
    background: var(--fo24-pwa-primary);
    color: #fff;
}
.fo24-tl-content {
    flex: 1;
}
.fo24-tl-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--fo24-pwa-text);
}
.fo24-tl-time {
    font-size: 11px;
    color: var(--fo24-pwa-text-muted);
    margin-top: 2px;
}
.fo24-tl-photo-box {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fo24-tl-photo-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
}
.fo24-btn-open-photo {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.fo24-detail-card {
    background: #f8fafc;
    border: 1px solid var(--fo24-pwa-border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
    font-size: 12.5px;
}
.fo24-detail-card h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 700;
}
.fo24-card-message {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    color: #475569;
}
.fo24-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.fo24-item-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}
.fo24-item-meta {
    font-size: 12px;
    display: flex;
    flex-direction: column;
}
.fo24-order-actions-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
.fo24-btn-reorder {
    background: var(--fo24-pwa-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.fo24-btn-order-wa {
    background: #25D366;
    color: #fff !important;
    text-decoration: none;
    border-radius: 10px;
    padding: 11px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    display: block;
}

/* Modale Zoom Foto HD */
.fo24-pwa-modal-photo {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
}
.fo24-pwa-modal-photo.is-open {
    display: flex;
}
.fo24-pwa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}
.fo24-pwa-modal-box {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 85vh;
    width: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.fo24-pwa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 14px;
}
.fo24-pwa-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
.fo24-photo-viewport {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    min-height: 280px;
    padding: 10px;
}
.fo24-photo-hd {
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
    transition: transform 0.15s ease;
}
.fo24-photo-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    gap: 8px;
}
.fo24-btn-zoom {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-weight: 700;
    cursor: pointer;
}
.fo24-btn-download {
    background: var(--fo24-pwa-primary);
    color: #fff !important;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
}
