/* Buyurtma chati — mijoz (oq) va ishlovchi (qora) ilovalarida bir xil tuzilma */
.mx-chat{position:fixed;inset:auto 0 0 0;z-index:2147483000;max-height:min(78vh,620px);display:grid;grid-template-rows:auto minmax(0,1fr) auto auto auto;background:var(--dk-surface,#fff);color:var(--dk-text,#111);border-radius:20px 20px 0 0;box-shadow:0 -10px 40px rgba(0,0,0,.25);padding:12px 14px calc(12px + var(--mbx-sa-bottom,env(safe-area-inset-bottom,0px)));gap:8px;font:15px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif}
.mx-chat header{display:flex;align-items:center;justify-content:space-between;gap:8px}.mx-chat header b{font-size:17px}
.mx-chat header button{width:44px;height:44px;border:0;border-radius:50%;background:var(--dk-surface-2,#f1f3f7);font-size:22px;cursor:pointer}
.mx-chat-list{list-style:none;margin:0;padding:4px 2px;overflow:auto;display:flex;flex-direction:column;gap:8px;min-height:120px}
.mx-chat-list li{max-width:82%;display:grid;gap:2px;padding:8px 12px;border-radius:14px;background:var(--dk-surface-2,#f1f3f7);overflow-wrap:anywhere}
.mx-chat-list li.mine{align-self:flex-end;background:#ffd21f}
:where(:root[data-theme="dark"]) .mx-chat-list li.mine{color:#0a0a0a}.mx-chat-list li small{font-size:11px;color:var(--dk-muted,#5b6475)}
.mx-chat-list .mx-chat-empty{align-self:center;background:none;color:var(--dk-muted,#5b6475)}
.mx-chat-quick{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}.mx-chat-quick button{flex:none;min-height:40px;padding:0 12px;border:1px solid var(--dk-border,#d5dbe5);border-radius:999px;background:var(--dk-surface,#fff);font:inherit;font-size:13px;cursor:pointer}
.mx-chat-form{display:flex;gap:8px}.mx-chat-form input{flex:1;min-width:0;min-height:46px;padding:0 12px;border:1px solid var(--dk-border,#d5dbe5);border-radius:12px;font:inherit}
.mx-chat-form button{min-height:46px;padding:0 16px;border:0;border-radius:12px;background:#111;color:#fff;font-weight:700;cursor:pointer}.mx-chat-form button:disabled,.mx-chat-form input:disabled{opacity:.5}
.mx-chat-note{margin:0;font-size:12px;color:var(--dk-muted,#5b6475)}.mx-chat-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:760px){.mx-chat{inset:auto 24px 24px auto;width:420px;border-radius:20px}}
/* 2026-11-19 — Egasi (haqiqiy telefon ~393 px, tizim shrifti katta): "yozuvlar har qayoqqa ketib qolgan". Varaq — grid, ustuni `auto` edi:
   forma (input ichki kengligi + «Yuborish») ekrandan keng bo'lsa (360 px da oddiy shriftda ham, 393 px da katta shriftda) ustun kengayib,
   «×», «Yuborish» va pastdagi izoh o'ngdan kesilardi; tayyor javoblar bitta qatorda edi (uzun chip ekrandan keng — chap va o'ngdan kesilgan).
   Endi: ustun minmax(0,1fr) va bolalar min-width:0 — varaq hech qachon ekrandan keng bo'lmaydi; kiritish maydoni qisqaradi, «Yuborish»
   to'liq turadi; tayyor javoblar keyingi qatorga o'tadi (chip ichida matn ham o'raladi); varaq sig'masa o'zi tepaga-pastga aylanadi. */
.mx-chat{grid-template-columns:minmax(0,1fr);max-height:min(78dvh,620px);overflow-y:auto;overscroll-behavior:contain}
.mx-chat>*{min-width:0;max-width:100%}
.mx-chat header b{min-width:0;overflow-wrap:anywhere}.mx-chat header button{flex:none}
.mx-chat-list .mx-chat-empty{max-width:100%;text-align:center;justify-items:center}
.mx-chat-quick{flex-wrap:wrap;overflow-x:visible}
.mx-chat-quick button{flex:0 1 auto;max-width:100%;min-height:44px;border-radius:22px;padding:8px 12px;line-height:1.25;white-space:normal;text-align:start;overflow-wrap:anywhere}
.mx-chat-form input{flex:1 1 0;width:0;min-width:0}
.mx-chat-form button{flex:0 0 auto;max-width:46%;line-height:1.15;overflow-wrap:anywhere}
.mx-chat-note{overflow-wrap:anywhere}
/* Yuklash xatosi: matn + «Qayta urinish» (avval javobsiz so'rovda abadiy «Xabarlar yuklanmoqda…» turardi) */
.mx-chat-retry{min-height:44px;margin-top:6px;padding:0 18px;border:0;border-radius:12px;background:#111;color:#fff;font:inherit;font-weight:700;cursor:pointer}
:where(:root[data-theme="dark"]) .mx-chat-retry{background:#fff;color:#111}
/* Past ekran (klaviatura ochiq): xabarlar ro'yxati va tayyor javoblar joy bo'shatadi — kiritish qatori ko'rinib turadi */
@media(max-height:560px){.mx-chat{max-height:calc(100dvh - 8px)}.mx-chat-list{min-height:56px}.mx-chat-quick{max-height:100px;overflow-y:auto}}
