/* Bottom sheets (детали АЗС, фильтры), лента комментов в iOS-стиле (аватар + баббл),
   скелетоны-shimmer, формы. Шторка тащится пальцем, защёлкивается на точках. */

.sheet { position: fixed; inset: 0; z-index: 1800; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.32s var(--ease-out); pointer-events: auto; }
.sheet.is-open .sheet-backdrop { opacity: 1; }
.sheet-card {
  position: relative; width: 100%; max-width: 540px; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--bg-elevated); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-3);
  transform: translateY(100%); transition: transform 0.42s var(--ease-spring); pointer-events: auto;
  padding-bottom: var(--safe-b); will-change: transform;
}
.sheet.is-open .sheet-card { transform: translateY(0); }
.sheet-handle { width: 38px; height: 5px; border-radius: 3px; background: var(--hair-strong); margin: 8px auto 4px; flex: none; cursor: grab; }
.sheet-grip { padding: 4px 0 2px; touch-action: none; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 22px 24px; }

@media (min-width: 861px) {
  .sheet { align-items: center; }
  .sheet-card { max-width: 440px; border-radius: var(--r-xl); transform: translateY(24px) scale(0.96); opacity: 0; transition: transform 0.34s var(--ease-spring), opacity 0.34s; max-height: 86vh; }
  .sheet.is-open .sheet-card { transform: none; opacity: 1; }
  .sheet-grip { display: none; }
}

/* Детали АЗС */
.azs-top { display: flex; align-items: flex-start; gap: 12px; }
.azs-net { flex: none; width: 50px; height: 50px; border-radius: 14px; box-shadow: var(--shadow-1); object-fit: contain; display: block; background: #fff; padding: 7px; }
.route-logo { border-radius: 5px; flex: none; }
.azs-h { flex: 1; min-width: 0; }
.azs-h h2 { font-size: 1.3rem; margin: 0 0 2px; font-weight: 750; }
.azs-h p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.azs-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 12px; border-radius: var(--r-pill); font-size: 0.86rem; font-weight: 650; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.azs-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.azs-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.azs-fuel { display: flex; align-items: center; justify-content: space-between; background: var(--fill); border-radius: var(--r); padding: 11px 13px; }
.azs-fuel.out { opacity: 0.5; }
.azs-fuel .fl { font-weight: 600; color: var(--ink-2); font-size: 0.9rem; }
.azs-fuel .pr { font-weight: 750; font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.azs-route-h { font-size: 1.04rem; font-weight: 700; margin: 6px 0 10px; }
.azs-actions { display: flex; gap: 9px; margin-bottom: 6px; }
.route-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 10px; border-radius: var(--r); background: var(--fill); color: var(--ink); font-weight: 650; font-size: 0.95rem; transition: transform 0.14s var(--ease-spring); }
.route-btn:active { transform: scale(0.96); }
.azs-upd { color: var(--muted); font-size: 0.78rem; text-align: center; margin: 8px 0 4px; }

/* Краудсорс-отметки наличия */
.azs-reports { margin-top: 16px; padding-top: 16px; border-top: 0.5px solid var(--hair); }
.azs-reports h3 { font-size: 1.08rem; margin: 0 0 3px; }
.azs-reports .sub { color: var(--muted); font-size: 0.85rem; margin: 0 0 10px; }
.rep-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 0.5px solid var(--hair); flex-wrap: wrap; }
.rep-row:last-child { border-bottom: none; }
.rep-fl { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 0.92rem; flex: 1; min-width: 80px; }
.rep-counts { display: flex; gap: 9px; font-size: 0.84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rep-c b { color: var(--ink); }
.rep-c.yes b { color: var(--green-d); }
.rep-c.no b { color: var(--empty); }
.rep-btns { display: flex; gap: 6px; }
.rep-btn { cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 650; padding: 7px 14px; border-radius: var(--r-pill); border: none; transition: transform 0.14s var(--ease-spring); }
.rep-btn:active, .rep-btn.tapped { transform: scale(0.86); }
.rep-btn.is-yes { background: var(--green-soft); color: var(--green-d); }
.rep-btn.is-no { background: color-mix(in srgb, var(--empty) 13%, transparent); color: var(--empty); }

/* Секция комментов */
.cmt-wrap { margin-top: 14px; padding-top: 16px; border-top: 0.5px solid var(--hair); }
.cmt-wrap h3 { font-size: 1.08rem; margin: 0 0 4px; }
.cmt-wrap .sub { color: var(--muted); font-size: 0.86rem; margin: 0 0 14px; }
.comments { padding: 6px 0 8px; }
.comments .container > .comments-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.comments-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.5rem; }
.comments-head .icon { color: var(--green); }

/* Лента */
.cmt-list { display: grid; gap: 14px; max-width: 720px; }
.cmt { display: flex; gap: 10px; }
.cmt-av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(145deg, hsl(var(--h, 140) 65% 56%), hsl(calc(var(--h, 140) + 25) 60% 46%)); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; box-shadow: var(--shadow-1); }
.cmt-reply .cmt-av { width: 30px; height: 30px; font-size: 0.8rem; }
.cmt-main { flex: 1; min-width: 0; }
.cmt-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.cmt-head b { font-size: 0.9rem; font-weight: 650; }
.cmt-head span { color: var(--muted); font-size: 0.78rem; }
.cmt-bubble { background: var(--fill); border-radius: 4px 16px 16px 16px; padding: 9px 13px; font-size: 0.96rem; color: var(--ink); overflow-wrap: anywhere; }
.cmt-reply-btn { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; background: none; border: none; color: var(--green-d); font: inherit; font-size: 0.8rem; font-weight: 650; padding: 6px 2px 0; }
.cmt-kids { margin-top: 10px; display: grid; gap: 10px; }
.cmt-reply-form { display: grid; gap: 8px; margin-top: 10px; }
.cmt-reply-form textarea { font: inherit; padding: 9px 12px; border: none; background: var(--fill); border-radius: var(--r-sm); outline: none; resize: vertical; }

/* Форма коммента */
.cmt-form { background: var(--card); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 10px; margin-bottom: 18px; max-width: 720px; box-shadow: var(--shadow-1); border: 0.5px solid var(--hair); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cmt-author { font: inherit; padding: 11px 13px; border: none; background: var(--fill); border-radius: var(--r-sm); outline: none; max-width: 280px; }
.cmt-text { font: inherit; padding: 11px 13px; border: none; background: var(--fill); border-radius: var(--r-sm); outline: none; resize: vertical; min-height: 46px; }
.cmt-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cmt-status { font-size: 0.86rem; font-weight: 600; }
.cmt-status.ok { color: var(--green-d); }
.cmt-status.err { color: var(--empty); }
.cmt-more { margin-top: 14px; width: 100%; }
.cmt-empty { color: var(--muted); font-size: 0.92rem; padding: 8px 0; }

/* Скелетоны */
.skeleton { position: relative; overflow: hidden; background: var(--fill); border-radius: var(--r); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 6%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-line { height: 12px; margin: 8px 0; }
.sk-card { height: 84px; margin-bottom: 9px; }
