/* Pagina «Viaggio da A a B» (viaggio.html, js/route.js) */
body { margin: 0; color: var(--rp-paper); background: var(--rp-ink); }
.rt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--rp-rule); }
.rt-brand { color: var(--rp-paper); text-decoration: none; font-family: var(--rp-display); font-size: 1.2rem; font-weight: 500; letter-spacing: -0.03em; }
.rt-brand b { color: var(--rp-amber); font-weight: 500; }
.rt-top nav { display: flex; gap: 14px; align-items: center; }
.rt-top nav a { color: var(--rp-dim); text-decoration: none; font-size: .92rem; }
.rt-top nav a:hover { color: var(--rp-paper); }
.rt-top select { background: var(--rp-ink2); color: var(--rp-paper); border: 1px solid var(--rp-rule); border-radius: 6px; padding: 4px 6px; font: inherit; }
.rt-main { max-width: 760px; margin: 0 auto; padding: 28px 16px 60px; }
.rt-main h1 { font-family: var(--rp-display); font-weight: 500; letter-spacing: -0.03em; font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 8px; }
.rt-lead { color: var(--rp-dim); margin: 0 0 22px; line-height: 1.5; max-width: 62ch; }
.rt-form { display: grid; grid-template-columns: 1fr auto; gap: 10px 10px; align-items: end; }
.rt-field { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rt-field label { font-size: .82rem; color: var(--rp-dim); }
.rt-field input { background: var(--rp-ink2); color: var(--rp-paper); border: 1px solid var(--rp-rule); border-radius: 8px; padding: 11px 12px; font: inherit; font-size: 1rem; min-width: 0; color-scheme: dark; }
.rt-field input:focus { border-color: var(--rp-amber); outline: none; }
.rt-when { grid-column: 1 / 2; }
.rt-when input { max-width: 260px; }
.rt-swap { flex: none; align-self: center; height: 44px; width: 40px; border-radius: 8px; border: 1px solid var(--rp-rule); background: var(--rp-ink2); color: var(--rp-dim); font-size: 1.1rem; cursor: pointer; }
.rt-swap:hover { color: var(--rp-paper); }
.rt-go { grid-column: 2 / 3; min-width: 140px; padding: 0 22px; height: 46px; border: 0; border-radius: 8px; background: var(--rp-amber); color: var(--rp-ink); font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer; }
.rt-go:hover { filter: brightness(1.06); }
.rt-go:active { transform: translateY(1px); }
.rt-go:disabled { opacity: .5; cursor: wait; }
.rt-sugg { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; margin: 4px 0 0; padding: 4px 0; list-style: none; background: var(--rp-ink2); border: 1px solid var(--rp-rule); border-radius: 8px; max-height: 300px; overflow: auto; }
.rt-sugg li { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.rt-sugg li:hover, .rt-sugg li:focus { background: var(--rp-rule); outline: none; }
.rt-sugg small { color: var(--rp-dim); white-space: nowrap; }
.rt-status { color: var(--rp-dim); min-height: 1.4em; margin: 18px 0 8px; }
.rt-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rt-res > li { border: 1px solid var(--rp-rule); border-radius: 10px; padding: 14px 16px; background: var(--rp-ink2); }
.rt-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.rt-sum .tm { font-family: var(--rp-mono); font-size: 1.35rem; }
.rt-sum .du { color: var(--rp-paper); }
.rt-sum .ch { color: var(--rp-dim); }
.rt-sum .dy { color: var(--rp-amber); font-size: .85rem; }
.rt-legs { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--rp-rule); }
.rt-legs li { display: grid; grid-template-columns: 4.2em 1fr; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--rp-rule); }
.rt-legs li:last-child { border-bottom: 0; }
.rt-legs .t { font-family: var(--rp-mono); color: var(--rp-dim); }
.rt-legs .tr { color: var(--rp-amber); font-size: .9rem; }
.rt-legs .w { color: var(--rp-dim); font-size: .9rem; font-style: italic; }
.rt-note { color: var(--rp-dim); font-size: .85rem; line-height: 1.5; margin-top: 26px; }
@media (max-width: 620px) {
  .rt-form { grid-template-columns: 1fr; }
  .rt-when, .rt-go { grid-column: 1 / -1; }
  .rt-when input { max-width: none; }
}
.rt-map { margin-left: auto; color: var(--rp-amber); font-size: .9rem; text-decoration: none; border: 1px solid var(--rp-rule); border-radius: 6px; padding: 4px 9px; }
.rt-map:hover { border-color: var(--rp-amber); }
.rt-sh { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; padding: 0; background: none; color: var(--rp-amber); border: 1px solid var(--rp-rule); border-radius: 6px; cursor: pointer; }
.rt-sh:hover, .rt-sh.ok { border-color: var(--rp-amber); }
.rt-sh:focus-visible { outline: 2px solid var(--rp-amber); outline-offset: 2px; }
/* proposte: etichette (più veloce, più affidabile, meno cambi…) e affidabilità stimata */
.rt-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.rt-tag { background: var(--rp-amber); color: var(--rp-ink); font-size: .78rem; font-weight: 600; border-radius: 4px; padding: 2px 7px; }
.rt-rel { color: var(--rp-dim); font-size: .82rem; }
.rt-next { margin-top: 10px; background: none; color: var(--rp-amber); border: 1px solid var(--rp-amber); border-radius: 6px; padding: 8px 12px; font: inherit; cursor: pointer; }
/* fermate come in Google Maps (js/route.js, dal 24.11.2026): A, B, C… con linea tratteggiata, maniglia ≡ per trascinare, ✕ per togliere, ⇅ con due sole */
.rt-stopsbox { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.rt-stops { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rt-stop { position: relative; display: grid; grid-template-columns: 24px 1fr auto auto; gap: 8px; align-items: end; }
.rt-stop:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: calc(100% - 23px); height: calc(100% + 8px); border-left: 2px dotted var(--rp-dim); z-index: 0; }
.rt-mk { position: relative; z-index: 1; align-self: end; margin-bottom: 12px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rp-dim); background: var(--rp-ink); color: var(--rp-paper); font: 600 .7rem/18px var(--rp-sans); text-align: center; box-sizing: border-box; }
.rt-stop:first-child .rt-mk { border-color: var(--rp-paper); }
.rt-stop:last-child .rt-mk { border-color: var(--rp-amber); background: var(--rp-amber); color: var(--rp-ink); }
.rt-rm, .rt-hd { width: 40px; height: 46px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--rp-dim); font-size: 1.1rem; cursor: pointer; padding: 0; }
.rt-rm:hover, .rt-hd:hover, .rt-rm:focus-visible, .rt-hd:focus-visible { color: var(--rp-paper); border-color: var(--rp-rule); outline: none; }
.rt-hd { cursor: grab; touch-action: none; font-size: 1.3rem; }
.rt-rm { font-size: 1.5rem; }
.rt-rm[hidden], .rt-hd[hidden], .rt-swap[hidden] { display: none; }
.rt-stop.drag { z-index: 5; }
.rt-stop.drag .rt-field input { border-color: var(--rp-amber); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.rt-stop.drag .rt-hd { cursor: grabbing; color: var(--rp-amber); }
.rt-viabox { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding-left: 32px; }
.rt-addvia { background: none; border: 0; padding: 4px 0; color: var(--rp-amber); font: inherit; font-size: .92rem; cursor: pointer; }
.rt-addvia:hover { text-decoration: underline; }
.rt-addvia[hidden] { display: none; }
.rt-vnote { margin: 0; color: var(--rp-dim); font-size: .82rem; }
.rt-vp { color: var(--rp-dim); font-size: .85rem; margin-top: 6px; }
.rt-vmark { color: var(--rp-ink); background: var(--rp-paper); font-size: .72rem; font-weight: 600; border-radius: 4px; padding: 1px 6px; vertical-align: 1px; }
/* giorni dopo la partenza, stile Skyscanner (13:12+2) */
.rt-pl { color: var(--rp-amber); font-family: var(--rp-sans); font-size: .62em; font-weight: 600; margin-left: 2px; vertical-align: super; line-height: 0; }

.rt-shared { margin: 16px 0 14px; }
.rt-shared > li { border-color: var(--rp-amber); }

/* Cuore delle donazioni (aggiunto da js/i18n.js prima del menu della lingua, 28.11.2026): come .ico.donate di css/site.css, che questa pagina non carica */
.ico.donate { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; box-sizing: border-box; background: var(--rp-ink); border: 1px solid var(--rp-edge, #5a564c); border-radius: 4px; color: var(--rp-amber); text-decoration: none; }
.ico.donate:hover { border-color: var(--rp-paper); }
.ico.donate svg { display: block; transition: fill .15s; }
.ico.donate:hover svg path { fill: currentColor; fill-opacity: .25; }
@media (hover: hover) {
  .ico.donate[data-tip]::after { content: attr(data-tip); position: absolute; right: 0; top: calc(100% + 8px); width: 230px; padding: 8px 10px; background: var(--rp-ink); color: var(--rp-paper); border: 1px solid var(--rp-edge, #5a564c); border-radius: 4px; font: 400 12px/1.4 var(--rp-sans); text-align: left; white-space: pre-line; opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .15s, transform .15s; z-index: 60; }
  .ico.donate[data-tip]:hover::after, .ico.donate[data-tip]:focus-visible::after { opacity: 1; transform: none; }
}
