/* Gornaz Go Mini App. Colors and radii come from /brand/tokens.css (design/brand). */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--gg-font);
  font-weight: 600;
  color: var(--gg-ink);
  background: var(--gg-page);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; overflow: hidden; }

/* ---------- map ---------- */
#map { position: absolute; inset: 0; background: var(--gg-page); }
#map .ymaps-2-1-79-ground-pane, #map [class*="ground-pane"] { filter: grayscale(0.55) contrast(0.95) brightness(1.04); }
.leaflet-tile-pane { filter: grayscale(0.2) brightness(1.02); }
.map-fab {
  position: absolute; z-index: 20; width: 52px; height: 52px; border-radius: 50%;
  background: var(--gg-surface); box-shadow: var(--gg-shadow-soft);
  display: grid; place-items: center;
}
.map-fab.top-left { top: calc(14px + env(safe-area-inset-top)); left: 16px; }
.map-fab.locate { right: 16px; }
.center-pin { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -100%); z-index: 15; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.center-pin .label { background: var(--gg-ink); color: #fff; font-size: 14px; padding: 8px 12px; border-radius: 12px; margin-bottom: 8px; max-width: 72vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center-pin .stick { width: 4px; height: 18px; background: var(--gg-ink); border-radius: 2px; }
.dot-from { width: 26px; height: 26px; border-radius: 50%; background: var(--gg-brand); border: 6px solid var(--gg-ink); }
.dot-to { width: 22px; height: 22px; border-radius: 6px; background: #fff; border: 6px solid var(--gg-ink); }
.pulse { position: absolute; left: 50%; top: 42%; width: 280px; height: 280px; margin: -140px 0 0 -140px; border-radius: 50%; background: rgba(248, 212, 78, .35); border: 2px solid rgba(248, 212, 78, .9); z-index: 12; pointer-events: none; animation: pulse 2.2s ease-out infinite; }
.pulse.second { animation-delay: 1.1s; }
@keyframes pulse { from { transform: scale(.25); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* ---------- bottom sheet ---------- */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--gg-surface); border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 30px rgba(17, 17, 17, .08);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 86%; overflow-y: auto;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet.with-nav { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.grabber { width: 44px; height: 5px; border-radius: 3px; background: #DADAD6; margin: 0 auto 14px; }

/* ---------- full pages (trips, profile, search) ---------- */
.page { position: absolute; inset: 0; z-index: 40; background: var(--gg-page); overflow-y: auto; padding: calc(16px + env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom)); }
.page.yellow { background: linear-gradient(180deg, var(--gg-brand) 0%, var(--gg-brand) 55%, #FBEBA6 100%); }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 16px; }

/* ---------- typography ---------- */
.h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 4px 0 6px; }
.h2 { font-size: 20px; font-weight: 800; margin: 18px 0 10px; }
.muted { color: var(--gg-ink-muted); font-weight: 600; }
.small { font-size: 14px; }
.section-label { color: var(--gg-ink-muted); font-size: 15px; font-weight: 700; margin: 18px 2px 10px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.logo-tile { width: 52px; height: 52px; border-radius: 15px; background: var(--gg-logo-tile); display: grid; place-items: center; }
.logo-tile img { width: 32px; }
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.brand-name i { font-style: italic; }

/* ---------- route box ---------- */
.route { background: var(--gg-field); border-radius: var(--gg-radius-m); padding: 4px 16px; }
.route.white { background: var(--gg-surface); box-shadow: var(--gg-shadow-soft); }
.route-row { display: flex; align-items: center; gap: 14px; min-height: 58px; width: 100%; text-align: left; }
.route-row + .route-row { border-top: 1px solid var(--gg-line); }
.route-row .text { flex: 1; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-row .text.placeholder { color: var(--gg-ink-muted); }
.m-from { width: 12px; height: 12px; border-radius: 50%; background: var(--gg-ink); flex: none; }
.m-to { width: 12px; height: 12px; border-radius: 3px; background: var(--gg-marker-to); flex: none; }

.where { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--gg-field); border-radius: var(--gg-radius-m); padding: 18px 16px; font-size: 22px; font-weight: 800; text-align: left; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 14px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 12px 16px; border-radius: 999px; background: var(--gg-field); font-size: 16px; white-space: nowrap; }
.chip.active { background: var(--gg-ink); color: var(--gg-brand); }

.fixed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fixed-card { background: var(--gg-brand-soft); border-radius: var(--gg-radius-m); padding: 14px 16px; text-align: left; }
.fixed-card .t { font-size: 17px; font-weight: 800; }
.fixed-card .p { color: var(--gg-brand-ink); font-size: 16px; margin-top: 6px; }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; border-radius: 18px; font-size: 19px; font-weight: 800; }
.btn-primary { background: var(--gg-ink); color: var(--gg-brand); }
.btn-primary:disabled { opacity: .45; }
.btn-secondary { background: var(--gg-field); color: var(--gg-ink); }
.btn + .btn { margin-top: 10px; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.action { background: var(--gg-field); border-radius: var(--gg-radius-m); padding: 16px 6px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 15px; }
.icon-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--gg-brand); display: grid; place-items: center; flex: none; }

/* ---------- tariff ---------- */
.tariff { margin-top: 12px; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--gg-radius-m); background: var(--gg-brand-soft); border: 2px solid var(--gg-ink); }
.tariff .name { font-size: 17px; font-weight: 800; }
.tariff .price { font-size: 26px; font-weight: 800; }
.tariff .meta { color: var(--gg-ink-muted); font-size: 14px; margin-top: 2px; }
.option-row { display: flex; align-items: center; gap: 14px; min-height: 58px; border-bottom: 1px solid var(--gg-line); font-size: 17px; width: 100%; text-align: left; }
.option-row:last-of-type { border-bottom: 0; }
.option-row .grow { flex: 1; }
.switch { width: 48px; height: 30px; border-radius: 15px; background: #D9D9D5; position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--gg-ink); }
.switch.on::after { left: 21px; background: var(--gg-brand); }

/* ---------- order tracking ---------- */
.progress { height: 10px; border-radius: 5px; background: #EEEEEC; overflow: hidden; margin: 14px 0; }
.progress > div { height: 100%; background: var(--gg-brand); border-radius: 5px; transition: width 1s linear; }
.plate { border: 2px solid var(--gg-ink); border-radius: 12px; padding: 6px 12px; text-align: left; flex: none; }
.plate .num { font-size: 22px; font-weight: 800; letter-spacing: .03em; }
.plate .reg { font-size: 13px; font-weight: 800; }
.driver { display: flex; align-items: center; gap: 14px; background: var(--gg-field); border-radius: var(--gg-radius-m); padding: 14px; margin-top: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--gg-brand); display: grid; place-items: center; font-size: 22px; font-weight: 800; flex: none; }
.driver .grow { flex: 1; min-width: 0; }
.driver .name { font-size: 19px; font-weight: 800; }
.rating { color: var(--gg-ink-muted); font-size: 15px; display: flex; align-items: center; gap: 4px; }
.pay-line { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 17px; }
.pay-line .grow { flex: 1; }
.pay-line b { font-size: 20px; }

/* ---------- done / rating ---------- */
.done-check { width: 120px; height: 120px; border-radius: 50%; background: var(--gg-ink); display: grid; place-items: center; margin: 30px auto 22px; }
.card { background: var(--gg-surface); border-radius: var(--gg-radius-l); padding: 20px; margin-top: 14px; box-shadow: var(--gg-shadow-soft); }
.stars { display: flex; gap: 10px; margin: 12px 0 6px; }
.star { width: 46px; height: 46px; }
.star path { fill: #E6E6E2; transition: fill .15s; }
.star.on path { fill: var(--gg-star); }

/* ---------- lists ---------- */
.list-item { display: flex; align-items: center; gap: 14px; background: var(--gg-surface); border-radius: var(--gg-radius-m); padding: 16px; margin-bottom: 10px; width: 100%; text-align: left; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .sub { color: var(--gg-ink-muted); font-size: 14px; margin-top: 3px; }
.badge { font-size: 13px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: var(--gg-field); }
.badge.ok { background: #E3F5E9; color: #1B7A3C; }
.badge.no { background: #FBE6E6; color: #B42318; }
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--gg-surface); border-radius: var(--gg-radius-l); padding: 18px; min-height: 130px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; }
.tile .icon-btn { width: 46px; height: 46px; }
.tile .t { font-size: 18px; font-weight: 800; }

/* ---------- search ---------- */
.search-box { display: flex; align-items: center; gap: 12px; background: var(--gg-surface); border-radius: var(--gg-radius-m); padding: 0 16px; min-height: 58px; box-shadow: var(--gg-shadow-soft); }
.search-box input { flex: 1; border: 0; outline: none; background: none; font-size: 18px; font-weight: 700; min-width: 0; }
.suggest { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--gg-line); width: 100%; text-align: left; }
.suggest .grow { flex: 1; min-width: 0; }
.suggest .t { font-size: 17px; }
.suggest .s { color: var(--gg-ink-muted); font-size: 14px; margin-top: 2px; }
.suggest .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--gg-field); display: grid; place-items: center; flex: none; }

/* ---------- bottom nav ---------- */
.nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--gg-surface); border-radius: 26px 26px 0 0; display: flex; gap: 6px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(17,17,17,.06); }
.nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 8px; border-radius: 18px; color: #6E706C; font-size: 14px; font-weight: 700; }
.nav button.active { background: var(--gg-ink); color: var(--gg-brand); }

/* ---------- misc ---------- */
.toast { position: fixed; left: 16px; right: 16px; top: calc(14px + env(safe-area-inset-top)); z-index: 100; background: var(--gg-ink); color: #fff; padding: 14px 16px; border-radius: 16px; font-size: 15px; box-shadow: var(--gg-shadow); animation: drop .25s ease-out; }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
.splash { position: fixed; inset: 0; z-index: 200; background: var(--gg-brand); display: grid; place-items: center; transition: opacity .3s; }
.splash .logo-tile { width: 96px; height: 96px; border-radius: 28px; box-shadow: var(--gg-shadow); animation: breathe 1.4s ease-in-out infinite; }
.splash .logo-tile img { width: 58px; }
@keyframes breathe { 50% { transform: scale(1.06); } }
.notice { background: var(--gg-brand-soft); border-radius: var(--gg-radius-m); padding: 14px 16px; font-size: 15px; margin-top: 12px; }
.notice.error { background: #FBE6E6; color: #8A1F1F; }
.skeleton { background: linear-gradient(90deg, #EEE 25%, #F6F6F4 50%, #EEE 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; height: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.price-text { white-space: pre-wrap; font-size: 15px; line-height: 1.5; font-weight: 600; }

/* ---------- confirm sheet ---------- */
.confirm-backdrop { position: absolute; inset: 0; z-index: 90; background: rgba(17, 17, 17, .35); animation: fade .2s ease-out; }
.confirm-sheet { z-index: 91; animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
