/* timeline.css — a linha do tempo do #inicio, no formato do TripIt.
   Só consome tokens de theme.css; não declara :root nem importa nada externo. */

#inicio .tl-header {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 4px 2px 18px; border-bottom: 1px solid var(--line);
}
#inicio .tl-header h2 { font-family: var(--font-display); font-size: 1.9rem; margin: 2px 0 6px; }
#inicio .tl-header p { color: var(--muted); margin: 0; font-size: .9rem; }
#inicio .tl-header .eyebrow { font-family: var(--font-mono); letter-spacing: .08em; font-size: .72rem; }
.tl-countdown { text-align: center; flex: none; }
.tl-countdown span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.tl-countdown strong { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--blue); }
.tl-countdown small { color: var(--muted); font-size: .7rem; }

.trip-calendar-section {
  margin: 18px 0 24px; padding: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.trip-calendar-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin-bottom: 14px;
}
.trip-calendar-head .eyebrow { margin: 0 0 3px; font-size: .65rem; }
.trip-calendar-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; }
.trip-calendar-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .7rem; }
.trip-calendar-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.trip-calendar-legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend-live i { background: var(--green); }
.legend-typical i { background: var(--gold); }
.legend-neutral i { background: var(--outline-variant); }
.trip-calendar-scroll { overflow-x: auto; overscroll-behavior-inline: contain; padding-bottom: 4px; }
.trip-calendar-board { min-width: 860px; }
.trip-cal-weekdays, .trip-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.trip-cal-weekdays { margin-bottom: 7px; }
.trip-cal-weekdays span {
  text-align: center; color: var(--muted); font: 600 .65rem var(--font-mono);
  letter-spacing: .08em;
}
.trip-cal-blank { min-height: 1px; }
.trip-cal-day {
  min-height: 142px; padding: 10px; overflow: hidden;
  background: var(--surface-lowest); border: 1px solid var(--outline-variant); border-radius: 10px;
}
.trip-cal-date { display: flex; align-items: baseline; gap: 5px; }
.trip-cal-date strong { font-family: var(--font-display); font-size: 1.25rem; line-height: 1; }
.trip-cal-date span { color: var(--muted); font: 600 .61rem var(--font-mono); letter-spacing: .06em; }
.trip-cal-city { min-height: 30px; margin: 5px 0 8px; font-size: .75rem; font-weight: 700; line-height: 1.25; }
.trip-calendar-weather {
  min-height: 70px; display: flex; align-items: center; gap: 7px;
  padding: 8px; border: 1px solid transparent; border-radius: 8px;
}
.trip-calendar-weather.weather-live { background: rgba(15,122,90,.11); border-color: rgba(15,122,90,.26); }
.trip-calendar-weather.weather-typical { background: rgba(253,101,30,.11); border-color: rgba(253,101,30,.28); }
.trip-calendar-weather .weather-icon { font-size: 20px; }
.trip-calendar-weather .weather-main { display: block; }
.trip-calendar-weather .weather-main strong { display: block; font-size: 15px; line-height: 1.1; }
.trip-calendar-weather .weather-main b { display: block; margin-top: 3px; font-size: 7px; line-height: 1.2; }
.trip-calendar-weather.weather-live .weather-main b { color: var(--green); }
.trip-calendar-weather.weather-typical .weather-main b { color: var(--coral); }
.trip-calendar-weather .weather-meta { display: block; margin-top: 4px; font-size: 7px; line-height: 1.45; }
.trip-calendar-weather .weather-meta span { display: block; }
.trip-calendar-weather .weather-loading { width: 100%; height: 48px; }
.trip-cal-neutral { background: var(--surface-low); }
.trip-calendar-empty {
  min-height: 70px; display: grid; place-items: center; padding: 8px;
  border: 1px dashed var(--outline-variant); border-radius: 8px;
  color: var(--muted); font-size: .72rem; text-align: center;
}

ol.tl, ol.tl .tl-rows, ol.tl .tl-stops { list-style: none; margin: 0; padding: 0; }
ol.tl { margin-top: 8px; }

.tl-day { margin-top: 10px; }
.tl-band {
  position: sticky; top: 0; z-index: 2;
  background: var(--paper); color: var(--ink2);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em;
  text-transform: uppercase; padding: 8px 4px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between;
}
.tl-band .tl-city-btn {
  color: var(--muted); text-transform: none; letter-spacing: 0;
  font: inherit; background: none; border: 0; padding: 2px 4px; margin: -2px -4px;
  border-radius: 6px; cursor: pointer;
}
.tl-band .tl-city-btn:hover, .tl-band .tl-city-btn:focus-visible { color: var(--ink); background: var(--line); }

.tl-rows { position: relative; padding-left: 34px; }
.tl-rows::before {
  content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-row { position: relative; }
.tl-node {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 8px 0; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink);
}
.tl-node:hover { border-color: var(--blue); }
.tl-dot {
  position: absolute; left: -34px; top: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--paper);
}
.tl-dot svg { width: 16px; height: 16px; }
.tl-checkout .tl-dot { background: var(--card); color: var(--blue); border: 2px solid var(--blue); }
.tl-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-copy strong { font-size: .95rem; }
.tl-copy small { color: var(--muted); font-size: .8rem; }

.tl-expander .tl-node { align-items: center; }
.tl-chev { margin-left: auto; color: var(--muted); }
.tl-stops { padding: 2px 0 8px 6px; }
.tl-stops li { margin: 2px 0; }
.tl-stops button {
  display: flex; gap: 10px; align-items: center; width: 100%;
  background: none; border: none; border-left: 2px solid var(--line);
  padding: 7px 10px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
}
.tl-stops button:hover { border-left-color: var(--blue); color: var(--blue); }
.tl-stops b { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin-right: 4px; }
.tl-stop-ic svg { width: 14px; height: 14px; }

@media (max-width: 560px) {
  #inicio .tl-header { flex-direction: column; align-items: flex-start; }
  .trip-calendar-section { margin-inline: -4px; padding: 14px 10px; }
  .trip-calendar-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .trip-calendar-board { min-width: 800px; }

  /* No celular, o ícone flutuante em "trilha" (posicionado com left negativo
     fora do card) aparecia cortado pela metade em alguns aparelhos — um
     efeito de posicionamento absoluto que não dependia só do CSS aqui (o
     Safari/iOS tem bugs conhecidos de clipping com position:sticky perto
     de elementos com offset negativo). Em vez de perseguir esse bug pixel
     a pixel, o ícone abaixo dessa largura vira um item normal do flex do
     próprio card — sem posicionamento absoluto, sem trilha, impossível de
     cortar não importa o aparelho. */
  .tl-rows { padding-left: 0; }
  .tl-rows::before { display: none; }
  .tl-dot {
    position: static; flex-shrink: 0;
  }
}
