/* Mobile app navigation + search sheet (includes/app-nav.php). Phones only: nothing here applies above 767px. */
.an-bar, .an-spacer, .an-sheet{display:none}

@media (max-width: 767.98px){
    :root{
        --an-primary:#0063dd;
        --an-primary-dark:#004fb6;
        --an-amber:#ff9a1f;
        --an-amber-dark:#ee6a00;
        --an-ink:#101828;
        --an-text:#475467;
        --an-muted:#7a8597;
        --an-line:#e4e8ef;
        --an-safe:env(safe-area-inset-bottom, 0px);
    }

    /* ---------- bottom bar ---------- */
    .an-spacer{display:block;height:calc(92px + var(--an-safe))}
    .an-bar{
        position:fixed;right:10px;left:10px;bottom:calc(10px + var(--an-safe));z-index:1000;
        display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:end;
        height:66px;padding:0 4px 8px;border-radius:24px;
        background:rgba(255,255,255,.94);
        -webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px);
        box-shadow:0 18px 40px -16px rgba(16,24,40,.35), 0 2px 8px rgba(16,24,40,.06), 0 0 0 1px rgba(16,24,40,.05);
        transition:transform .32s cubic-bezier(.2,.8,.2,1), opacity .2s;
        font-family:inherit;direction:rtl;
    }
    .an-bar.is-hidden{transform:translateY(calc(100% + 24px + var(--an-safe)));opacity:0;pointer-events:none}

    .an-item, .an-fab{
        position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;
        min-width:0;height:100%;color:#667085 !important;text-decoration:none !important;
        -webkit-tap-highlight-color:transparent;
    }
    .an-item__icon{
        display:flex;align-items:center;justify-content:center;width:48px;height:30px;border-radius:15px;
        transition:background-color .25s, transform .25s;
    }
    .an-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
    .an-item__label{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;line-height:1.2;font-weight:600}
    .an-item:active .an-item__icon{transform:scale(.9)}
    .an-item.is-active{color:var(--an-primary) !important}
    .an-item.is-active .an-item__icon{background:#e8f1ff}
    .an-item.is-active .an-icon{stroke-width:2.2}
    .an-item.is-active .an-item__label{font-weight:bold}
    .an-avatar{
        display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;
        background:linear-gradient(135deg,#2581ff,#0050b8);color:#fff;font-size:13px;font-weight:bold;line-height:1;
    }

    /* raised search button */
    .an-fab{color:var(--an-ink) !important}
    .an-fab__btn{
        position: absolute;
        top: -18px;
        left: 50%;
        margin-left: -24px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 51px;
        height: 51px;
        border-radius: 50%;
        background: radial-gradient(circle at 30% 25%, #4d9bff, var(--an-primary) 55%, var(--an-primary-dark));
        color: #fff;
        box-shadow: 0 0 0 4px #fff, 0 14px 26px -8px rgba(0,82,194,.75);
        transition: transform .2s cubic-bezier(.2,.8,.2,1);
    }
    .an-fab__btn .an-icon{width:27px;height:27px;stroke-width:2.4}
    .an-fab:active .an-fab__btn{transform:scale(.92)}
    .an-fab .an-item__label{font-weight:bold}
    /* first visit: a soft ring draws the eye to the search button a few times */
    .an-fab.is-hinting .an-fab__btn::after{
        content:'';position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;
        border:2px solid var(--an-primary);animation:an-ring 1.8s ease-out 3;
    }

    /* existing floating WhatsApp buttons move above the bar */
    .whatsapp-sticked{bottom:calc(92px + var(--an-safe)) !important;left:14px !important}
    .whatsapp-sticked-blog a{bottom:calc(96px + var(--an-safe)) !important}

    /* ---------- search sheet ---------- */
    html.an-lock{overflow:hidden}
    .an-sheet:not([open]){display:none}
    .an-sheet[open]{
        display:flex;flex-direction:column;
        position:fixed;top:auto;right:0;bottom:0;left:0;margin:0;
        width:100%;max-width:100%;max-height:92vh;max-height:92dvh;padding:0;border:0;
        border-radius:26px 26px 0 0;background:#fff;color:var(--an-ink);overflow:hidden;
        box-shadow:0 -20px 50px -20px rgba(2,10,28,.45);
        font-family:inherit;direction:rtl;text-align:right;
        animation:an-up .34s cubic-bezier(.2,.8,.2,1);
    }
    .an-sheet.is-closing{animation:an-down .22s ease-in forwards}
    .an-sheet.is-dragging{animation:none;transition:none}
    .an-sheet::backdrop{background:rgba(5,13,30,.55);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:an-fade .3s ease-out}
    .an-sheet.is-closing::backdrop{animation:an-fade-out .22s ease-in forwards}

    .an-sheet__drag{flex-shrink:0;touch-action:none;cursor:grab}
    .an-sheet__grip{display:block;width:42px;height:5px;margin:10px auto 4px;border-radius:5px;background:#d0d5dd}
    .an-sheet__head{display:flex;align-items:flex-start;gap:12px;padding:6px 20px 14px}
    .an-sheet__heading{flex:1;min-width:0}
    .an-sheet__heading h2{margin:0;color:var(--an-ink);font-family:sky-bold,Poppins,sans-serif;font-weight:normal;font-size:1.4rem;line-height:1.35}
    .an-sheet__live{display:flex;align-items:center;gap:8px;margin:3px 0 0;color:var(--an-text);font-size:13px;line-height:1.5}
    .an-pulse{position:relative;flex:0 0 8px;height:8px;border-radius:50%;background:#12b76a}
    .an-pulse::after{content:'';position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;border-radius:50%;background:rgba(18,183,106,.35);animation:an-ping 1.8s ease-out infinite}
    .an-sheet__close{
        display:flex;align-items:center;justify-content:center;flex:0 0 38px;height:38px;padding:0;border:0;border-radius:12px;
        background:#f2f4f7;color:#475467;cursor:pointer;
    }
    .an-sheet__close .an-icon{width:18px;height:18px;stroke-width:2.2}
    .an-sheet__body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:0 20px calc(22px + var(--an-safe))}

    /* last search */
    .an-recent{
        display:flex;align-items:center;gap:12px;margin:0 0 14px;padding:10px 12px;border-radius:14px;
        background:#f5f8fc;border:1px solid #e3eaf4;color:var(--an-ink) !important;text-decoration:none !important;
    }
    .an-recent[hidden]{display:none}
    .an-recent__icon{display:flex;align-items:center;justify-content:center;flex:0 0 34px;height:34px;border-radius:10px;background:#fff;color:var(--an-primary)}
    .an-recent__icon .an-icon{width:18px;height:18px}
    .an-recent__text{flex:1;min-width:0}
    .an-recent__text small{display:block;color:var(--an-muted);font-size:11.5px}
    .an-recent__text strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13.5px}
    .an-recent > .an-icon{width:18px;height:18px;color:var(--an-muted)}

    /* search form */
    .an-search{margin:0}
    .an-section-title{display:flex;align-items:center;gap:10px;margin:0 0 12px}
    .an-section-title h3{flex:1;margin:0;color:var(--an-ink);font-size:15.5px;font-weight:bold;line-height:1.4}
    .an-section-title__icon{display:flex;align-items:center;justify-content:center;flex:0 0 32px;height:32px;border-radius:10px}
    .an-section-title__icon .an-icon{width:17px;height:17px;stroke-width:2.2}
    .an-section-title__icon--blue{background:#e8f1ff;color:var(--an-primary)}
    .an-reset{padding:4px 10px;border:0;border-radius:999px;background:#f2f4f7;color:#475467;font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}
    .an-reset[hidden]{display:none}

    .an-group{min-width:0;margin:0 0 14px;padding:0;border:0}
    .an-label{display:block;float:none;width:auto;margin:0 0 7px;padding:0;color:#344054;font-size:13px;font-weight:bold;line-height:1.4}
    .an-label small{color:var(--an-muted);font-size:11.5px;font-weight:normal}

    .an-segment{display:flex;gap:4px;padding:4px;border-radius:14px;background:#f2f4f7}
    .an-segment label{flex:1 1 auto;position:relative;margin:0;cursor:pointer}
    .an-segment input, .an-chip input{position:absolute;width:1px;height:1px;margin:0;opacity:0}
    .an-segment span{
        display:flex;align-items:center;justify-content:center;height:38px;padding:0 8px;border-radius:10px;
        color:#475467;font-size:13px;font-weight:600;white-space:nowrap;transition:background-color .2s, color .2s, box-shadow .2s;
    }
    .an-segment input:checked + span{background:#fff;color:var(--an-primary);box-shadow:0 2px 6px rgba(16,24,40,.1)}
    .an-segment input:focus-visible + span{box-shadow:0 0 0 2px var(--an-primary)}

    .an-chips{display:flex;flex-wrap:wrap;gap:8px}
    .an-chip{position:relative;margin:0;cursor:pointer}
    .an-chip span{
        display:inline-flex;align-items:center;gap:0;height:38px;padding:0 14px;border:1.5px solid var(--an-line);border-radius:999px;
        background:#fff;color:#344054;font-size:13.5px;font-weight:600;transition:all .2s;
    }
    .an-chip .an-icon{width:0;height:15px;stroke-width:2.6;opacity:0;transition:width .2s, opacity .2s, margin .2s}
    .an-chip input:checked + span{border-color:var(--an-primary);background:var(--an-primary);color:#fff}
    .an-chip input:checked + span .an-icon{width:15px;margin-left:6px;opacity:1}
    .an-chip input:focus-visible + span{box-shadow:0 0 0 3px #fff, 0 0 0 5px var(--an-primary)}

    .an-select{position:relative;display:flex;align-items:center}
    .an-select > .an-icon{position:absolute;right:14px;width:18px;height:18px;color:#98a2b3;pointer-events:none}
    .an-select::after{
        content:'';position:absolute;left:16px;top:50%;width:8px;height:8px;margin-top:-6px;
        border-left:2px solid var(--an-muted);border-bottom:2px solid var(--an-muted);transform:rotate(-45deg);pointer-events:none;
    }
    .an-select select{
        width:100%;height:48px;margin:0;padding:0 42px 0 38px;border:1px solid var(--an-line);border-radius:14px;
        background:#f7f9fc;color:var(--an-ink);font-family:inherit;font-size:15px;
        -webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;
    }
    .an-select select:focus{outline:none;border-color:var(--an-primary);background:#fff;box-shadow:0 0 0 4px rgba(0,99,221,.14)}

    .an-show{
        display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:54px;margin:4px 0 0;padding:0 18px;
        border:0;border-radius:16px;background:linear-gradient(135deg,#2581ff,var(--an-primary-dark));color:#fff;
        font-family:sky-bold,Poppins,sans-serif;font-size:16.5px;cursor:pointer;
        box-shadow:0 14px 26px -14px rgba(0,82,194,.85);transition:background .25s, box-shadow .25s, color .25s, transform .15s;
    }
    .an-show:active{transform:scale(.98)}
    .an-show .an-icon{width:20px;height:20px;stroke-width:2.2}
    .an-show[disabled]{background:#eef1f5;color:#8a94a6;box-shadow:none;cursor:default}
    .an-show[disabled] .an-icon{display:none}
    .an-spinner{display:none;width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;animation:an-spin .8s linear infinite}
    .an-show.is-loading .an-spinner{display:inline-block}
    .an-show.is-loading .an-icon{display:none}
    .an-empty{margin:8px 0 0;color:#b54708;font-size:12.5px;font-weight:600;text-align:center}
    .an-empty[hidden]{display:none}

    .an-or{position:relative;margin:18px 0;text-align:center}
    .an-or::before{content:'';position:absolute;top:50%;right:0;left:0;border-top:1px dashed #d5dbe5}
    .an-or span{position:relative;padding:0 12px;background:#fff;color:var(--an-muted);font-size:12.5px;font-weight:600}

    /* request path */
    .an-request{
        display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;padding:14px;border-radius:18px;
        background:linear-gradient(160deg,#fff6ea,#fffdf9 70%);border:1px solid #ffdcb0;
        transition:box-shadow .3s, border-color .3s;
    }
    .an-request.is-suggested{border-color:var(--an-amber);animation:an-glow 1.6s ease-in-out 2}
    .an-request__icon{
        display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:14px;
        background:linear-gradient(135deg,#ffb247,var(--an-amber-dark));color:#fff;box-shadow:0 10px 18px -10px rgba(238,106,0,.9);
    }
    .an-request__icon .an-icon{stroke-width:2}
    .an-request__text h3{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;color:var(--an-ink);font-size:15.5px;font-weight:bold;line-height:1.4}
    .an-request__text p{margin:3px 0 0;color:var(--an-text);font-size:13px;line-height:1.6}
    .an-request__carry{color:#b54708 !important;font-weight:600}
    .an-request__carry[hidden]{display:none}
    .an-badge{padding:2px 9px;border-radius:999px;background:#dcfae6;color:#067647;font-size:11px;font-weight:bold}
    .an-request__btn{
        grid-column:1 / -1;display:flex;align-items:center;justify-content:center;gap:8px;height:48px;margin-top:10px;border-radius:14px;
        background:linear-gradient(135deg,#ffab3d,var(--an-amber-dark));color:#fff !important;text-decoration:none !important;
        font-family:sky-bold,Poppins,sans-serif;font-size:16px;box-shadow:0 12px 22px -12px rgba(238,106,0,.9);
    }
    .an-request__btn .an-icon{width:19px;height:19px}
    .an-request__btn:active{transform:scale(.98)}

    @keyframes an-up{from{transform:translateY(100%)}to{transform:none}}
    @keyframes an-down{to{transform:translateY(100%)}}
    @keyframes an-fade{from{opacity:0}to{opacity:1}}
    @keyframes an-fade-out{to{opacity:0}}
    @keyframes an-spin{to{transform:rotate(360deg)}}
    @keyframes an-ping{0%{transform:scale(.6);opacity:1}100%{transform:scale(1.6);opacity:0}}
    @keyframes an-ring{0%{transform:scale(1);opacity:.9}100%{transform:scale(1.55);opacity:0}}
    @keyframes an-glow{0%,100%{box-shadow:0 0 0 0 rgba(255,154,31,0)}50%{box-shadow:0 0 0 6px rgba(255,154,31,.25)}}
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce){
    .an-bar, .an-item__icon, .an-fab__btn, .whatsapp-sticked, .whatsapp-sticked-blog a{transition:none}
    .an-sheet[open], .an-sheet.is-closing, .an-sheet::backdrop, .an-request.is-suggested, .an-fab.is-hinting .an-fab__btn::after, .an-pulse::after{animation:none}
}
