/* ===== ADelivery — клиентский PWA. Использует токены из ../styles.css ===== */
.app-body { background: var(--app-bg) no-repeat; background-color: var(--bg); -webkit-tap-highlight-color: transparent; }
#app { min-height: 100vh; }

.app-splash { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #FF7A1A, #FFB35C); }
.app-splash__logo { width: 84px; height: 84px; border-radius: 22px; background: #fff url(icon.svg) center/60% no-repeat; box-shadow: 0 10px 30px rgba(0,0,0,.15); }

/* ---- общий каркас экрана ---- */
.scr { max-width: 680px; margin-inline: auto; min-height: 100vh; padding-bottom: 92px; }
.scr--pad { padding: 12px 16px 92px; }
.bar { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 10px 16px 8px; }
.bar__row { display: flex; align-items: center; gap: 10px; }
.h1 { font-size: 22px; font-weight: 800; }
.h2 { font-size: 17px; font-weight: 800; margin: 16px 0 8px; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.center-empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* ---- кнопки/инпуты (как в кабинете) ---- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:none; border-radius:14px; font:inherit; font-weight:700; cursor:pointer; background:var(--accent); color:#fff; padding:0 18px; height:50px; width:100%; transition:background .15s,opacity .15s; }
.btn:active { opacity:.85; } .btn:disabled { opacity:.55; }
.btn--ghost { background:transparent; color:var(--accent); border:1.5px solid var(--line); }
.btn--sm { height:38px; width:auto; padding:0 14px; font-size:14px; border-radius:999px; }
.inp { width:100%; height:50px; padding:0 14px; font-size:16px; border:1.5px solid var(--line); border-radius:14px; background:var(--input-bg); color:var(--text); outline:none; font-family:var(--font); }
.inp:focus { border-color:var(--accent); }
.err { background:#fdeae6; color:#b3331f; border-radius:12px; padding:10px 14px; font-size:14px; margin:8px 0; }
.field { margin-bottom: 12px; } .field label { display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
.note { font-size:13px; color:var(--muted); line-height:1.5; margin-top:10px; }

/* ---- вход ---- */
.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.auth { width:min(420px,100%); background:var(--card); border-radius:28px; box-shadow:var(--shadow); padding:30px 24px; }
.auth__logo { width:56px; height:56px; border-radius:16px; margin:0 auto 14px; background:linear-gradient(135deg,#FF7A1A,#FFB35C) url(icon.svg) center/58% no-repeat; }
.auth h1 { text-align:center; font-size:22px; } .auth .sub { text-align:center; color:var(--muted); margin-bottom:20px; font-size:14px; }

/* ---- чипы города/адреса ---- */
.chip { display:inline-flex; align-items:center; gap:6px; background:var(--card); border:1px solid var(--line); border-radius:999px; padding:7px 14px; font-size:14px; font-weight:600; cursor:pointer; box-shadow:var(--shadow); }
.chip--soft { background:var(--soft); border-color:transparent; color:var(--accent); }
.addr-line { display:flex; align-items:center; gap:8px; background:var(--card); border-radius:16px; padding:12px 14px; box-shadow:var(--shadow); cursor:pointer; margin-top:10px; }

/* ---- сегменты ---- */
.seg { display:flex; gap:8px; margin:14px 0 6px; }
.seg button { flex:1; height:46px; border:none; border-radius:14px; background:var(--card); color:var(--muted); font-weight:700; font-size:15px; box-shadow:var(--shadow); cursor:pointer; }
.seg button.on { background:var(--soft); color:var(--accent); }

/* ---- карточки ресторанов ---- */
.rcard { background:var(--card); border-radius:20px; overflow:hidden; box-shadow:var(--shadow); margin-bottom:14px; cursor:pointer; }
.rcard__img { width:100%; aspect-ratio:16/9; object-fit:cover; background:var(--soft); display:block; }
.rcard__b { padding:12px 14px; }
.rcard__name { font-weight:800; font-size:17px; }
.rcard__meta { color:var(--muted); font-size:13px; margin-top:3px; display:flex; gap:10px; flex-wrap:wrap; }
.badge-self { font-size:11px; font-weight:700; color:var(--accent); background:var(--soft); padding:2px 8px; border-radius:999px; }

/* ---- ресторан / меню ---- */
.rhead__img { width:100%; aspect-ratio:16/9; object-fit:cover; background:var(--soft); }
.mitem { display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.mitem:last-child { border-bottom:none; }
.mitem__img { width:72px; height:72px; border-radius:14px; object-fit:cover; background:var(--soft); flex:none; }
.mitem__name { font-weight:700; } .mitem__desc { color:var(--muted); font-size:13px; margin-top:2px; }
.mitem__price { font-weight:800; margin-top:6px; }
.card { background:var(--card); border-radius:20px; box-shadow:var(--shadow); padding:14px 16px; margin-bottom:12px; }

/* ---- корзина ---- */
.qty { display:inline-flex; align-items:center; gap:10px; }
.qty button { width:32px; height:32px; border-radius:10px; border:1.5px solid var(--line); background:var(--input-bg); font-size:18px; font-weight:700; cursor:pointer; color:var(--accent); }
.cart-item { display:flex; gap:10px; align-items:flex-start; padding:12px 0; border-bottom:1px solid var(--line); }
.cart-item:last-child { border-bottom:none; }
.row-line { display:flex; justify-content:space-between; padding:5px 0; }
.row-line b { font-weight:800; }
.total-line { display:flex; justify-content:space-between; align-items:center; margin-top:8px; padding-top:12px; border-top:1px solid var(--line); }
.total-line .big { font-size:22px; font-weight:800; }

/* ---- нижняя навигация (floating) ---- */
.nav { position:fixed; left:0; right:0; bottom:0; z-index:30; padding:0 12px calc(env(safe-area-inset-bottom, 0px) + 10px); pointer-events:none; }
.nav__in { max-width:560px; margin-inline:auto; background:var(--glass-bg); -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(180%); backdrop-filter:blur(var(--glass-blur)) saturate(180%); border:1px solid var(--glass-border); border-radius:24px; box-shadow:var(--glass-shadow); display:flex; pointer-events:auto; overflow:hidden; }
.nav__b { flex:1; border:none; background:transparent; padding:10px 0 9px; display:flex; flex-direction:column; align-items:center; gap:3px; color:var(--muted); font-size:11px; font-weight:600; cursor:pointer; position:relative; }
.nav__b.on { color:var(--accent); }
.nav__ic { width:24px; height:24px; }
.nav__badge { position:absolute; top:4px; left:calc(50% + 8px); min-width:16px; height:16px; padding:0 4px; border-radius:999px; background:var(--accent); color:#fff; font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; }

/* ---- статусы заказа ---- */
.steps { display:flex; flex-direction:column; gap:0; }
.step { display:flex; gap:12px; align-items:flex-start; }
.step__dot { width:14px; height:14px; border-radius:50%; background:var(--line); margin-top:3px; flex:none; }
.step.done .step__dot { background:var(--accent); }
.step__line { width:2px; flex:1; background:var(--line); margin:2px 0; min-height:18px; }
.step.done .step__line { background:var(--accent); }
.ostatus { font-size:13px; font-weight:700; padding:4px 10px; border-radius:999px; background:var(--soft); color:var(--accent); }

/* ---- шторки ---- */
.sheet-back { position:fixed; inset:0; background:rgba(20,18,16,.45); z-index:50; display:flex; align-items:flex-end; justify-content:center; }
.sheet { background:var(--glass-strong); -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(180%); backdrop-filter:blur(var(--glass-blur)) saturate(180%); border-top:1px solid var(--glass-border); width:min(560px,100%); border-radius:26px 26px 0 0; padding:18px 18px calc(env(safe-area-inset-bottom,0px) + 18px); max-height:92vh; overflow-y:auto; }
@media(min-width:600px){ .sheet-back{align-items:center;} .sheet{border-radius:24px;} }
.sheet h3 { font-size:18px; margin-bottom:12px; }
.sheet__grip { width:38px; height:4px; border-radius:2px; background:var(--line); margin:0 auto 14px; }
.opt { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.opt:last-child { border-bottom:none; }
.opt .spacer { flex:1; }
.toast { position:fixed; left:50%; bottom:96px; transform:translateX(-50%); background:#1c1b19; color:#fff; padding:11px 18px; border-radius:999px; font-size:14px; z-index:80; opacity:0; transition:opacity .2s; pointer-events:none; max-width:90%; }
.toast.on { opacity:1; } .toast--err { background:#b3331f; }
.sg { display:inline-flex; gap:6px; flex-wrap:wrap; }
.sg button { border:1.5px solid var(--line); background:var(--input-bg); border-radius:999px; padding:7px 13px; font-size:14px; cursor:pointer; }
.sg button.on { background:var(--soft); border-color:transparent; color:var(--accent); font-weight:700; }
.suggest { border:1px solid var(--line); border-radius:14px; margin-top:6px; overflow:hidden; }
.suggest div { padding:11px 14px; border-bottom:1px solid var(--line); cursor:pointer; font-size:14px; }
.suggest div:last-child { border-bottom:none; }
.back-btn { width:40px; height:40px; border-radius:12px; border:none; background:var(--card); box-shadow:var(--shadow); font-size:20px; cursor:pointer; color:var(--text); }
.rating-star { color:#FF9500; }
/* Автоподсказки адреса (выпадающий список под полем «Адрес») */
.addr-wrap { position:relative; }
.addr-sug { position:absolute; left:0; right:0; top:100%; z-index:30; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); margin-top:4px; overflow:hidden; max-height:240px; overflow-y:auto; }
.addr-sug:empty { display:none; }
.addr-sug__i { padding:11px 14px; border-bottom:1px solid var(--line); cursor:pointer; font-size:14px; }
.addr-sug__i:last-child { border-bottom:none; }
.addr-sug__i:active, .addr-sug__i:hover { background:var(--soft); }
