/* Programmi di viaggio dentro «Viaggio dalla tua città» */
.hd-trip-programs { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.hd-trip-programs[data-found="1"] ~ #hdTripCityEmpty,
.hd-trip-programs[data-only="1"] ~ #hdTripCityEmpty,
.hd-trip-programs[data-only="1"] ~ #hdTripCityLines { display: none !important; }
.hd-trip-program__panel { border: 1.5px solid #e9ecef; border-radius: 12px; padding: 14px 16px; margin: -2px 0 8px; display: flex; flex-direction: column; gap: 12px; }
.hd-trip-program__panel[hidden] { display: none; }
.hd-trip-program__station { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #667085; }
.hd-trip-program__results { display: flex; flex-direction: column; gap: 12px; }
.hd-trip-program__trains { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hd-trip-program__column { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hd-trip-program__title { font-size: 14px; font-weight: 600; }
.hd-trip-program__row { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; border: 1.5px solid #e9ecef; border-radius: 10px; padding: 9px 11px; font-size: 14px; cursor: pointer; margin: 0; }
.hd-trip-program__row--flight { grid-template-columns: auto 36px minmax(0, 1fr) auto; }
.hd-trip-program__logo-box { display: inline-flex; width: 36px; height: 24px; }
.hd-trip-program__logo { width: 36px; height: 24px; object-fit: contain; border-radius: 4px; background: #fff; }
.hd-trip-program__flight { min-width: 0; font-size: 14px; }
.hd-trip-program__flight strong { font-weight: 600; }
.hd-trip-program__flight small { display: block; color: #667085; font-size: 13px; font-variant-numeric: tabular-nums; }
.hd-trip-program__choose { width: 100%; padding: 11px 16px; border: 0; border-radius: 10px; background: var(--primary, #1e3c72); color: #fff; font-weight: 600; font-size: 15px; }
.hd-trip-program__choose:disabled { opacity: .6; }
.hd-trip-program__bags { display: flex; flex-direction: column; gap: 8px; }
.hd-trip-program__bag { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1.5px solid #e9ecef; border-radius: 10px; padding: 9px 11px; }
.hd-trip-program__stepper { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.hd-trip-program__stepper button { width: 30px; height: 30px; border: 1.5px solid #dfe5ed; border-radius: 8px; background: #fff; color: #1e3c72; font-size: 16px; line-height: 1; }
.hd-trip-program__row.is-selected { border-color: var(--accent, #f5a623); background: rgba(245, 166, 35, .06); }
.hd-trip-program__row.is-disabled { opacity: .45; cursor: not-allowed; }
.hd-trip-program__carrier { color: #667085; font-size: 13px; }
.hd-trip-program__time, .hd-trip-program__price { font-variant-numeric: tabular-nums; }
.hd-trip-program__notice { background: #fdf4e3; color: #7a5208; border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.hd-trip-program__error { color: #b42318; font-size: 14px; }
.hd-trip-program__wait { color: #667085; font-size: 14px; }
.hd-trip-program__totals { display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.hd-trip-program__line { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.hd-trip-program__line--total { border-top: 1px solid #e9ecef; padding-top: 7px; font-weight: 700; font-size: 16px; }
@media (max-width: 620px) {
    .hd-trip-program__trains { grid-template-columns: 1fr; }
}

/* La finestra alta da subito: non salta mentre arrivano prezzi e orari. */
@media (min-width: 768px) {
    .hd-trip-programs[data-only="1"] { min-height: 400px; }
}

/* «Viaggio aggiunto» su desktop: una riga sola, quando non ci sono tratte da elencare. */
@media (min-width: 768px) {
    .hd-trip-added:has(> .hd-trip-added__rows:empty) { flex-direction: row; align-items: center; }
    .hd-trip-added:has(> .hd-trip-added__rows:empty) .hd-trip-added__head { flex: 1 1 auto; min-width: 0; padding: 9px 14px; border-bottom: 0; background: transparent; }
    .hd-trip-added:has(> .hd-trip-added__rows:empty) .hd-trip-added__check { width: 28px; height: 28px; flex-basis: 28px; font-size: 15px; }
    .hd-trip-added:has(> .hd-trip-added__rows:empty) .hd-trip-added__title strong { font-size: 14.5px; }
    .hd-trip-added:has(> .hd-trip-added__rows:empty) .hd-trip-added__total strong { font-size: 17px; }
    .hd-trip-added:has(> .hd-trip-added__rows:empty) .hd-trip-added__total small { display: none; }
    .hd-trip-added:has(> .hd-trip-added__rows:empty) .hd-trip-added__actions { flex: none; gap: 12px; padding: 0 14px 0 0; }
    .hd-trip-added:has(> .hd-trip-added__rows:empty) .hd-trip-added__edit { min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; }
    .hd-trip-added:has(> .hd-trip-added__rows:empty) .hd-trip-added__remove { min-height: 34px; padding: 0; font-size: 13.5px; }
}
