/* Қоғамдық көлік: бағыттар тізімі, бағыт карточкасы (аялдамалар таймлайны), аялдама, попаптар.
   Түстер app.css айнымалыларынан; бағыт түсі --c, белгідегі мәтін түсі --fg. */

/* ───────── Бағыт нөмірінің белгісі ───────── */
.trn-badge { display: inline-grid; place-items: center; min-width: 36px; height: 26px; padding: 0 7px; border-radius: 7px; background: var(--c, var(--blue)); color: var(--fg, #fff); font-weight: 800; font-size: 13px; letter-spacing: -.01em; line-height: 1; white-space: nowrap; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.trn-badge.sm { min-width: 28px; height: 20px; padding: 0 5px; border-radius: 5px; font-size: 11px; }
.trn-badge.xl { min-width: 60px; height: 48px; padding: 0 11px; border-radius: 13px; font-size: 23px; box-shadow: 0 6px 16px color-mix(in srgb, var(--c, var(--blue)) 35%, transparent), inset 0 0 0 1px rgba(0, 0, 0, .08); }
.trn-badge-btn { display: inline-flex; border-radius: 7px; transition: transform .12s; }
.trn-badge-btn:hover { transform: translateY(-1px); }

/* ───────── Тізім ───────── */
.trn-lines .rt-head b small { font-weight: 500; font-size: 13px; }
.trn-search { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; padding: 0 12px; background: var(--surface-2); border: 1.5px solid transparent; border-radius: 12px; transition: border-color .15s, box-shadow .15s; cursor: text; }
.trn-search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.trn-search span { color: var(--text-3); font-size: 15px; }
.trn-search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; padding: 10px 0; font-size: 15px; }
.trn-chip b { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.trn-chip.on b { background: rgba(255, 255, 255, .25); color: #fff; }
.trn-count { margin: 0 4px 4px; font-size: 12px; color: var(--text-3); }
.trn-list { gap: 0; }
.trn-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 8px; border-radius: 12px; transition: background .12s; }
.trn-row:hover { background: var(--surface-2); }
.trn-row + .trn-row { box-shadow: 0 -1px 0 var(--border); }
.trn-row:hover, .trn-row:hover + .trn-row { box-shadow: none; }
.trn-row .trn-badge { min-width: 44px; height: 30px; font-size: 14px; border-radius: 8px; }
.trn-row-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.trn-row-body b { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trn-row-body small { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trn-ico { margin-right: 5px; }
.trn-chev { color: var(--text-3); font-size: 20px; line-height: 1; }
.trn-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.trn-tag { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); white-space: nowrap; }
.trn-tag.ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.trn-tag.dim { background: transparent; color: var(--text-3); border: 1px solid var(--border); }
.trn-foot { margin: 14px 4px 0; font-size: 11.5px; line-height: 1.5; color: var(--text-3); }

/* ───────── Бағыт карточкасы ───────── */
.trn-hero { display: flex; align-items: flex-start; gap: 14px; padding: 4px 2px 12px; }
.trn-hero-body { flex: 1; min-width: 0; }
.trn-hero h2 { margin: 0 0 4px; font-size: 18px; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.trn-name { font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.trn-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.trn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.trn-actions .btn { flex: 1 1 auto; padding: 9px 12px; font-size: 13px; }
.trn-actions .btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.trn-vars { margin: -2px 0 12px; }
.trn-vars > small { display: block; margin: 0 2px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.trn-vars .chip { font-size: 12px; padding: 6px 10px; }

.trn-card { margin: 0 0 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.trn-card h4 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; font-size: 14px; }
.trn-card h4 small { font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.trn-src { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 700; }
.trn-src.ok { border-color: transparent; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.trn-svc-sub { margin: 0 0 8px; font-size: 12px; color: var(--text-3); }
.trn-svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.trn-svc-grid div { display: grid; gap: 2px; padding: 8px 6px; border-radius: 10px; background: var(--surface-2); text-align: center; }
.trn-svc-grid small { font-size: 10.5px; line-height: 1.2; color: var(--text-3); }
.trn-svc-grid b { font-size: 16px; font-variant-numeric: tabular-nums; }
.trn-status { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 9px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.trn-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.trn-status.ok { color: var(--ok); }
.trn-status.ok i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.trn-all { margin-top: 9px; }
.trn-all summary { list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.trn-all summary::-webkit-details-marker { display: none; }
.trn-all summary::after { content: ' ▾'; font-size: 10px; }
.trn-all[open] summary::after { content: ' ▴'; }
.trn-all summary small { margin-left: 4px; font-weight: 500; color: var(--text-3); }
.trn-times { display: flex; flex-wrap: wrap; gap: 4px; max-height: 200px; overflow: auto; margin-top: 8px; padding: 2px; }
.trn-times span { padding: 3px 6px; border-radius: 6px; background: var(--surface-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.trn-times .past { color: var(--text-3); opacity: .6; }
.trn-times .next { background: var(--accent); color: #fff; font-weight: 700; }
.trn-warn { margin: 0 0 6px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 11%, transparent); color: var(--warn); font-size: 12.5px; font-weight: 600; }
.trn-svc-big { margin: 8px 0 2px; font-size: 15px; font-weight: 700; }
.trn-hours { display: grid; gap: 3px; margin-top: 8px; font-size: 12px; }
.trn-hours small { color: var(--text-3); }
.trn-hours code { padding: 4px 7px; border-radius: 6px; background: var(--surface-2); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.trn-note { margin: 8px 0 0; padding-left: 8px; border-left: 3px solid var(--border); font-size: 12px; color: var(--text-2); }

/* ───────── Аялдамалар таймлайны ───────── */
.trn-tl { list-style: none; margin: 0; padding: 0; }
.trn-tl li { position: relative; }
.trn-tl li::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 4px; background: var(--c); }
.trn-tl li.first::before { top: 18px; }
.trn-tl li.last::before { bottom: auto; height: 18px; }
.trn-tl li.first.last::before { display: none; }
.trn-stop { position: relative; display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 4px; text-align: left; border-radius: 10px; }
.trn-dot { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 18px; height: 18px; }
.trn-dot::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c); box-sizing: border-box; transition: transform .15s; }
.trn-tl li.first .trn-dot::after, .trn-tl li.last .trn-dot::after { width: 18px; height: 18px; border-width: 4px; background: var(--c); box-shadow: inset 0 0 0 3px var(--surface); }
.trn-stop:hover .trn-dot::after { transform: scale(1.25); }
.trn-stop:hover .trn-stop-body b { color: var(--accent); }
.trn-stop-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.trn-stop-body b { font-size: 13.5px; font-weight: 600; line-height: 18px; overflow-wrap: anywhere; transition: color .12s; }
.trn-tl li.first .trn-stop-body b, .trn-tl li.last .trn-stop-body b { font-weight: 750; }
.trn-stop-body small { font-size: 11.5px; color: var(--text-3); }
.trn-off { flex: none; font-size: 12px; line-height: 18px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ───────── Жөнелу уақыттары ───────── */
.trn-deps { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.trn-dep { padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); color: var(--text); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trn-dep.est { background: var(--surface-2); border: 1px dashed var(--text-3); font-weight: 600; }
.trn-dep i { font-style: normal; font-weight: 500; color: var(--text-3); }
.trn-deps em { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.trn-soon { font-size: 12px; font-weight: 700; color: var(--ok); white-space: nowrap; }
.trn-dim { color: var(--text-3); }
.trn-sub { flex-basis: 100%; font-size: 11.5px; }
.trn-off-txt { color: var(--warn); font-weight: 600; }

/* ───────── Аялдама көрінісі ───────── */
.trn-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.trn-deplist { display: grid; }
.trn-deprow { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.trn-deprow:first-child { padding-top: 2px; border-top: 0; }
.trn-deprow:last-child { padding-bottom: 0; }
.trn-deprow .trn-badge { min-width: 42px; height: 28px; }
.trn-deprow-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.trn-deprow-body b { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trn-depinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12.5px; color: var(--text-2); }

/* ───────── Попаптар және маркер ───────── */
.trn-pop { min-width: 220px; }
.trn-pop-title { display: flex; align-items: center; gap: 6px; }
.trn-pop-list { display: grid; gap: 6px; margin-top: 4px; }
.trn-pop-row { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; row-gap: 2px; font-size: 12px; }
.trn-pop-dir { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.trn-pop-info { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; font-size: 11.5px; color: var(--text-2); }
.trn-pop-note { margin-top: 2px; font-size: 10.5px; line-height: 1.35; color: var(--text-3); }
.trn-warn-sm { color: var(--warn); font-weight: 600; }
.trn-stop-mk { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 5px solid var(--accent); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }

/* ───────── Мобильді ───────── */
@media (max-width: 760px) {
  .trn-search input { font-size: 16px; }
  .trn-hero h2 { font-size: 17px; }
  .trn-badge.xl { min-width: 52px; height: 42px; font-size: 20px; border-radius: 11px; }
  .trn-svc-grid b { font-size: 15px; }
  .trn-actions .btn { padding: 10px 12px; }
}
/* Тар телефондар (≤ 360 px): попап ені innerWidth − 96 px-пен шектеледі */
@media (max-width: 360px) {
  .trn-pop { min-width: 0; }
  .trn-svc-grid { gap: 4px; }
  .trn-svc-grid div { padding: 7px 4px; }
}
