/* iBridge.az — ümumi rənglər və əsas üslublar */
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/fonts/unbounded-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }

:root {
  --ink: #1B1326;          /* mürəkkəb */
  --aubergine: #3A1D4E;    /* badımcan */
  --aubergine-2: #54306E;
  --nar: #C5283D;          /* nar */
  --saffron: #F4B63F;      /* zəfəran — stikerin rəngi */
  --mist: #EDF1F5;         /* Xəzər dumanı */
  --paper: #FFFFFF;
  --line: #D9DFE7;
  --muted: #5F6672;
  --ok: #1F7A4D;
  --display: "Unbounded", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans Devanagari", "PingFang SC", "Microsoft YaHei", sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--mist); line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---- söhbət (turist səhifəsi və biznes tətbiqi üçün ortaq) ---- */
.msgs { flex: 1; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.msg { max-width: min(84%, 560px); padding: 9px 12px 6px; border-radius: 16px; background: var(--paper); align-self: flex-start; border-end-start-radius: 4px; box-shadow: 0 1px 0 rgba(27,19,38,.08); }
.msg.me { align-self: flex-end; background: var(--aubergine); color: #fff; border-end-start-radius: 16px; border-end-end-radius: 4px; box-shadow: none; }
.msg .main { font-size: 1.05rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .sub { font-size: .86rem; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(27,19,38,.12); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me .sub { border-top-color: rgba(255,255,255,.22); color: rgba(255,255,255,.78); }
.msg .meta { display: flex; gap: 8px; justify-content: flex-end; align-items: center; font-size: .72rem; margin-top: 3px; color: var(--muted); }
.msg.me .meta { color: rgba(255,255,255,.7); }
.msg .tag { background: var(--saffron); color: var(--ink); border-radius: 4px; padding: 0 5px; font-weight: 700; letter-spacing: .02em; }
.msg .pending { font-style: italic; }
.msg .fail { color: var(--nar); font-weight: 600; }
.msg.me .fail { color: #FFC2CA; }
.msg .play { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 6px 12px 6px 8px; background: var(--mist); color: var(--ink); margin-bottom: 6px; font-size: .9rem; }
.msg.me .play { background: rgba(255,255,255,.16); color: #fff; }
.msg .play svg { width: 22px; height: 22px; flex: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--aubergine); background: transparent; color: var(--aubergine); border-radius: 999px; padding: 7px 13px; font-size: .92rem; white-space: nowrap; }
.chip:active { background: var(--aubergine); color: #fff; }

.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 1.5px solid var(--line); border-radius: 22px; padding: 10px 14px; max-height: 120px; background: var(--mist); font-size: 1rem; line-height: 1.35; }
.composer textarea:focus { outline: none; border-color: var(--aubergine); background: #fff; }
.round { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--aubergine); color: #fff; }
.round svg { width: 22px; height: 22px; }
.round.mic { background: var(--saffron); color: var(--ink); }
.round.mic.on { background: var(--nar); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
.round:disabled { opacity: .45; }
.recbar { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 6px; color: var(--nar); font-weight: 600; }
.recbar button { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 8px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(197,40,61,.18); } }
@media (prefers-reduced-motion: reduce) { .round.mic.on { animation: none; } }

.toast { position: fixed; inset-inline: 16px; bottom: 90px; margin: auto; max-width: 420px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; text-align: center; z-index: 50; }

[dir="rtl"] #sendBtn svg { transform: scaleX(-1); }

/* ---- qiymət təklifi və yer kartları ---- */
.msg.card { min-width: 210px; }
.msg .lbl { font-size: .8rem; font-weight: 700; opacity: .75; display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.msg .lbl svg { width: 18px; height: 18px; }
.msg .price { font-size: 1.9rem; font-weight: 800; line-height: 1.15; text-align: start; }
[dir="rtl"] .msg .price, [dir="rtl"] .msg .conv { text-align: right; }
.msg .price.old { text-decoration: line-through; opacity: .55; font-size: 1.3rem; }
.msg .conv { font-size: .95rem; color: var(--muted); white-space: pre-wrap; }
.msg.me .conv { color: rgba(255,255,255,.8); }
.msg .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.msg .btns button { border: 0; border-radius: 10px; padding: 11px 8px; font-weight: 700; }
.msg .btns .yes { background: var(--ok); color: #fff; }
.msg .btns .no { background: var(--mist); color: var(--ink); }
.msg .st { margin-top: 6px; font-weight: 700; font-size: .92rem; opacity: .85; }
.msg .st.ok { color: var(--ok); opacity: 1; }
.msg.me .st.ok { color: #8FE3B4; }
.msg .st.no { color: var(--nar); opacity: 1; }
.msg.me .st.no { color: #FFC2CA; }
.msg .links { display: flex; gap: 8px; margin-top: 8px; }
.msg .links a { text-decoration: none; font-weight: 700; font-size: .9rem; border-radius: 999px; padding: 7px 13px; background: var(--saffron); color: var(--ink); }
.chip.act { background: var(--aubergine); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.chip.act svg { width: 17px; height: 17px; }

.sheet { position: fixed; inset: 0; background: rgba(27,19,38,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 40; }
.sheet-in { background: var(--paper); width: 100%; max-width: 640px; border-radius: 20px 20px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 85dvh; overflow-y: auto; }
.sheet-in h2 { margin: 0 0 12px; font-size: 1.15rem; }
.sheet-in .opt { display: block; width: 100%; text-align: start; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 14px 4px; font-size: 1.05rem; }
.sheet-in .close { display: block; width: 100%; margin-top: 12px; border: 1.5px solid var(--line); background: none; border-radius: 12px; padding: 12px; font-weight: 600; }

/* ---- səfərin sonu, reytinq, qabaqcadan sifariş ---- */
.msg .stars { display: flex; gap: 2px; margin: 6px 0 2px; direction: ltr; }
.msg .stars button { border: 0; background: none; font-size: 2rem; line-height: 1; padding: 2px 4px; color: #C9CFD8; }
.msg .stars button.on { color: var(--saffron); }
.msg .stars.ro { font-size: 1.5rem; color: var(--saffron); letter-spacing: 2px; }
.msg .when { font-size: 1.25rem; font-weight: 800; line-height: 1.25; margin-bottom: 4px; }
.msg .lbl.loc { margin-top: 4px; font-size: .95rem; opacity: 1; font-weight: 600; }
.sheet-in .field { display: grid; gap: 6px; margin-bottom: 12px; font-size: .9rem; font-weight: 600; }
.sheet-in .field input, .sheet-in .field select { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; font-size: 1.05rem; background: var(--paper); width: 100%; }
.sheet-in .go2 { display: block; width: 100%; border: 0; border-radius: 12px; background: var(--saffron); color: var(--ink); font-weight: 700; padding: 14px; font-size: 1.05rem; }

/* ---- restoran: sifariş kartı və menyu ---- */
.msg .lines { margin-top: 4px; min-width: 230px; }
.msg .line { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; font-size: 1.02rem; }
.msg .line .sum { white-space: nowrap; font-weight: 600; }
.msg .orig { font-size: .82rem; opacity: .7; margin: -3px 0 3px; }
.msg .line.total { border-top: 1px solid rgba(27,19,38,.15); margin-top: 5px; padding-top: 7px; font-weight: 800; font-size: 1.12rem; }
.msg.me .line.total { border-top-color: rgba(255,255,255,.3); }
.sheet.full { align-items: stretch; }
.sheet.full .sheet-in { border-radius: 0; max-height: none; height: 100dvh; padding: 0; display: flex; flex-direction: column; }
.mhead { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: var(--aubergine); color: #fff; }
.mhead h2 { margin: 0; font-size: 1.2rem; }
.mhead button { border: 0; background: none; color: #fff; font-size: 1.7rem; line-height: 1; padding: 4px 8px; }
.mbody { flex: 1; overflow-y: auto; padding: 4px 16px 20px; }
.mbody h3 { margin: 20px 0 6px; font-size: .95rem; color: var(--aubergine); border-bottom: 2px solid var(--aubergine); padding-bottom: 6px; }
.mitem { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.mitem .nm { font-weight: 700; font-size: 1.05rem; }
.mitem .og { font-size: .84rem; color: var(--muted); }
.mitem .ds { font-size: .9rem; color: var(--muted); margin-top: 2px; }
.mitem .pr { text-align: end; font-weight: 800; white-space: nowrap; }
.mitem .pr small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.mtags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.mtags span { font-size: .74rem; font-weight: 700; border-radius: 5px; padding: 2px 7px; background: var(--mist); color: var(--ink); }
.mtags .halal { background: #DDF1E5; color: var(--ok); }
.mtags .spicy { background: #FBE3E6; color: var(--nar); }
.qty { grid-column: 2; display: flex; align-items: center; gap: 4px; justify-content: flex-end; direction: ltr; }
.qty button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--aubergine); background: none; color: var(--aubergine); font-size: 1.3rem; line-height: 1; }
.qty button.plus { background: var(--aubergine); color: #fff; }
.qty b { min-width: 24px; text-align: center; }
.mfoot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.mfoot button { width: 100%; border: 0; border-radius: 12px; background: var(--saffron); color: var(--ink); font-weight: 800; font-size: 1.08rem; padding: 15px; display: flex; justify-content: space-between; }
.mfoot button:disabled { opacity: .45; }

/* ---- otel: məlumat kartı ---- */
.inforow { display: flex; justify-content: space-between; gap: 16px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.inforow span { color: var(--muted); }
.inforow b { text-align: end; overflow-wrap: anywhere; }

/* ---- geniş ekran: pəncərələr aşağıdan yox, ortada açılır ---- */
@media (min-width: 900px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-in { border-radius: 20px; max-width: 480px; padding: 22px; }
  .sheet.full { align-items: center; }
  .sheet.full .sheet-in { height: min(88dvh, 860px); max-width: 620px; border-radius: 20px; overflow: hidden; padding: 0; }
  .toast { bottom: 40px; }
}

/* ---- menyu: yeməyin şəkli, xidmət haqqı ---- */
.mitem.has-photo { grid-template-columns: 72px 1fr auto; }
.mitem.has-photo .mphoto { grid-row: span 2; }
.mitem.has-photo .qty { grid-column: 3; }
.mitem.has-photo .mphoto.big { grid-column: 1 / -1; grid-row: auto; }
.msg .line.fee { font-size: .94rem; opacity: .85; }

/* mesajın vəziyyəti: bir işarə göndərilib, iki işarə çatıb, göy oxunub */
.msg .tick { display: inline-flex; align-items: center; }
.msg .tick svg { height: 11px; width: auto; display: block; }
.msg .tick.read { color: #5CC8F5; }

/* mesajın menyusu və silinmiş mesaj */
.msg .more { border: 0; background: none; color: inherit; opacity: .55; font-size: 1rem; line-height: 1; padding: 2px 4px; margin-inline-start: 2px; border-radius: 6px; }
.msg .more:hover, .msg .more:focus-visible { opacity: 1; }
.msg.gone .main { font-style: italic; opacity: .7; font-size: .95rem; }
.delsheet .sheet-in { display: grid; gap: 8px; }
.delsheet .opt { border: 1.5px solid var(--line); background: var(--paper); border-radius: 14px; padding: 14px; font-weight: 600; font-size: 1rem; text-align: center; color: var(--ink); }
.delsheet .opt.red { color: var(--nar); }
.delsheet .opt.quiet { border-color: transparent; color: var(--muted); }

/* göndərilməyi gözləyən səs yazısı */
.voicechip { display: flex; align-items: center; gap: 8px; margin: 0 12px 6px; padding: 6px 8px 6px 12px; background: #E7DDF0; border-radius: 999px; font-size: .88rem; font-weight: 600; width: fit-content; max-width: calc(100% - 24px); }
.voicechip button { border: 0; background: rgba(27,19,38,.12); width: 24px; height: 24px; border-radius: 50%; line-height: 1; font-size: 1rem; flex: none; }
