/* Плитки тревел-портала: карта, карточка поездки, транспорт, места, журнал */

/* ---------- карта ---------- */
.tile-map { padding: 0; gap: 0; overflow: hidden; background: var(--sea); }
.tile-map .tile-head { position: absolute; top: 18px; left: 22px; right: 22px; z-index: 1; pointer-events: none; }
.tile-map .tile-head h2 { padding: 7px 14px; color: var(--ink); }
.tile-map svg { display: block; width: 100%; height: auto; margin-top: auto; }
.tile-map .hint { position: absolute; left: 22px; bottom: 16px; font-size: 12.5px; color: var(--ink-2); }

.legend { display: flex; gap: 6px; flex-wrap: wrap; padding: 7px 12px; }
.legend span { display: flex; align-items: center; gap: 6px; padding: 0 4px; font-size: 12.5px; color: var(--ink-2); }
.legend span::before { content: ""; width: 16px; border-top: 2.5px solid currentColor; border-radius: 2px; }
.legend .rail::before { color: var(--rail); }
.legend .bus::before { color: var(--bus); border-top: 3px dotted; }
.legend .air::before { color: var(--air); border-top-style: dashed; }

/* ---------- карточка поездки ---------- */
.tile-trip { flex-direction: row; gap: 0; padding: 0; overflow: hidden; }
.trip-info { flex: 1 1 55%; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 22px 24px 24px; }
.trip-map { flex: 1 1 45%; min-height: 300px; margin: 8px; overflow: hidden; background: var(--sea); border-radius: calc(var(--r) - 8px); }
.trip-map svg { display: block; width: 100%; height: 100%; }

.nav { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.nav span { min-width: 52px; text-align: center; }
.nav button {
  width: 34px; height: 34px; padding: 0 0 2px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--tile-2);
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
.nav button:hover:not(:disabled) { background: var(--line); }
.nav button:disabled { opacity: .35; cursor: default; }

.when { font-size: 14px; color: var(--ink-2); }
.route { display: grid; gap: 6px; }
.route .city { font: 600 30px/1.1 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.via { display: flex; align-items: center; gap: 10px; }
.via::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line); }

.mode-pill { padding: 4px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 500; color: #fff; background: var(--ink-2); }
.mode-pill.rail { background: var(--rail); }
.mode-pill.bus { background: var(--bus); color: #2A1F05; }
.mode-pill.air { background: var(--air); }

.meta { margin-top: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.meta dt { margin-bottom: 2px; font-size: 12.5px; color: var(--ink-3); }
.meta dd { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- транспорт ---------- */
.bar { margin-top: auto; display: flex; gap: 3px; height: 14px; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.modes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.modes li { display: grid; gap: 1px; font-size: 13px; color: var(--ink-2); }
.modes b { font: 600 20px/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); }
.modes .dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }

/* ---------- самый частый маршрут ---------- */
.top-route { margin-top: auto; font: 600 17px/1.2 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }

/* ---------- где бывал ---------- */
.places { margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.place { display: grid; align-content: start; gap: 8px; padding: 14px 16px; background: var(--tile-2); border-radius: 18px; }
.place .country { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 600; }
.place .country small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.place ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.place li { padding: 3px 10px; background: var(--tile); border-radius: 99px; font-size: 13px; color: var(--ink-2); }

/* ---------- все поездки ---------- */
.log { margin-top: 4px; }
.log .year { padding: 18px 0 8px; font: 600 15px/1 var(--display); letter-spacing: -.02em; }
.log .year:first-child { padding-top: 6px; }
.log .row {
  display: grid;
  grid-template-columns: 64px 10px minmax(0, 1.3fr) minmax(0, 1fr) 76px;
  align-items: center;
  gap: 14px;
  margin: 0 -12px;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14.5px;
  cursor: pointer;
}
.log .row:hover { background: var(--tile-2); }
.log .row.on { background: var(--tile-2); font-weight: 500; }
.log .date, .log .km { font-size: 13px; color: var(--ink-3); }
.log .km { text-align: right; }
.log .mode { width: 10px; height: 10px; border-radius: 50%; }
.log .mode.rail { background: var(--rail); }
.log .mode.bus { background: var(--bus); }
.log .mode.air { background: var(--air); }
.log .text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.log .carrier { color: var(--ink-2); }
.log.collapsed .extra { display: none; }

/* ---------- телефон ---------- */
@media (max-width: 720px) {
  .tile-map { padding: 0; }
  .tile-map .tile-head { position: static; padding: 14px 14px 0; }
  .tile-map .pill { box-shadow: none; }
  .tile-map .hint { position: static; padding: 0 16px 12px; }

  .tile-trip { flex-direction: column; padding: 0; }
  .trip-info { padding: 16px 18px 18px; }
  .trip-map { flex-basis: auto; min-height: 220px; margin: 0 8px 8px; }
  .route .city { font-size: 24px; }

  .modes b { font-size: 17px; }

  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .place { padding: 12px; border-radius: 16px; }
  .place li { padding: 2px 8px; font-size: 12.5px; }

  .log .row { grid-template-columns: 52px 10px minmax(0, 1fr) 64px; gap: 10px; font-size: 14px; }
  .log .carrier { display: none; }
}
