/* Website route comparison: visual treatment only; scores remain planner values. */
.route-tab .tab-topline { justify-content: flex-start; flex-wrap: nowrap; }
.route-tab-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; }
.route-tab-icon svg { display: block; }
.route-tab-selected { display: none; }
.route-tab .tab-bottomline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.route-tab .recommended-label { margin-left: 0; }
.route-scroll-controls { display: none; }

@media screen {
  .route-tabs { align-items: stretch; gap: 10px; padding: 2px 2px 6px; }
  .route-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 158px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #cce9f4;
    border-radius: 16px;
    background: #fff;
    color: #143247;
  }
  .route-tab:hover { border-color: #77bfd7; transform: translateY(-1px); }
  .route-tab:focus-visible { outline: 3px solid #c98612; outline-offset: 2px; }
  .route-tab[aria-selected="true"] {
    color: #fff;
    border-color: #6ac5e3;
    background: linear-gradient(140deg, #087ca4, #075985);
    box-shadow: inset 0 0 0 1px #6ac5e3;
  }
  .route-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 145px;
    height: 66px;
    background: url("/route-card-waves.svg") right bottom / contain no-repeat;
    pointer-events: none;
  }
  .route-tab .tab-topline { position: relative; gap: 10px; padding-right: 15px; }
  .route-tab-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #087ca4;
    background: #e3f5fc;
  }
  .route-tab[aria-selected="true"] .route-tab-icon {
    color: #fff;
    background: rgba(104, 204, 237, .2);
    box-shadow: inset 0 0 0 1px rgba(160, 227, 248, .3);
  }
  .route-tab .tab-name { font-size: 1rem; line-height: 1.2; }
  .route-tab-selected {
    position: absolute;
    right: -5px;
    top: -2px;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    color: #087ca4;
    background: #fff;
  }
  .route-tab[aria-selected="true"] .route-tab-selected { display: inline-flex; }
  .route-tab small { margin: 9px 0 16px; color: #526c7c; font-size: .82rem; line-height: 1.4; }
  .route-tab[aria-selected="true"] small { color: #d9f2fc; }
  .route-tab .tab-bottomline { position: relative; z-index: 1; margin-top: auto; gap: 8px; }
  .route-tab .tab-score { font-size: 1.07rem; font-weight: 850; color: #07658e; white-space: nowrap; }
  .route-tab[aria-selected="true"] .tab-score { color: #fff; }
  .route-tab .recommended-label {
    padding: 5px 8px;
    color: #086853;
    background: #e3f5ed;
    font-size: .57rem;
    letter-spacing: .045em;
    line-height: 1.2;
  }
  .coverage-pill { display: inline-flex; align-items: center; gap: 7px; }
  .coverage-pill::before {
    content: "✓";
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 900;
    line-height: 1;
  }
}

@media screen and (max-width: 580px) {
  .route-tabs { gap: 8px; padding: 11px 2px 4px; scrollbar-width: none; }
  .route-tabs::-webkit-scrollbar { display: none; }
  .route-tab {
    flex: 0 0 clamp(190px,64%,230px);
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: 24px auto;
    align-content: center;
    column-gap: 6px;
    row-gap: 4px;
    min-height: 78px;
    padding: 10px;
    overflow: visible;
    border-radius: 12px;
  }
  .route-tab[aria-selected="true"]::after { display: none; }
  .route-tab-icon { width: 24px; height: 24px; }
  .route-tab-icon svg { width: 18px; height: 18px; }
  .route-tab .tab-topline { grid-area: 1 / 1; gap: 5px; padding-right: 0; min-width: 0; }
  .route-tab .tab-name { font-size: .82rem; white-space: nowrap; }
  .route-tab-selected { position: static; flex: none; width: 13px; height: 13px; }
  .route-tab-selected svg { width: 9px; height: 9px; }
  .route-tab small { grid-area: 2 / 1 / 3 / 3; margin: 0; font-size: .75rem; line-height: 1.3; }
  .route-tab .tab-bottomline { display: contents; }
  .route-tab .tab-score { grid-area: 1 / 2; align-self: center; font-size: .82rem; }
  .route-tab .recommended-label { position: absolute; top: -9px; left: 10px; padding: 3px 7px; color: var(--success); background: #e7f6f1; font-size: .56rem; }
  .route-scroll-controls { display: block; margin: 1px 2px 12px; }
  .route-scroll-range { display: block; width: 100%; height: 24px; margin: 0; padding: 0; border: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: ew-resize; }
  .route-scroll-range::-webkit-slider-runnable-track { height: 6px; border-radius: 9px; background: #dceff7; }
  .route-scroll-range::-webkit-slider-thumb { width: 54px; height: 6px; margin-top: 0; border: 0; border-radius: 9px; appearance: none; -webkit-appearance: none; background: #087ca4; }
  .route-scroll-range::-moz-range-track { height: 6px; border: 0; border-radius: 9px; background: #dceff7; }
  .route-scroll-range::-moz-range-thumb { width: 54px; height: 6px; border: 0; border-radius: 9px; background: #087ca4; }
  .route-scroll-range:focus-visible { outline: 2px solid #c98612; outline-offset: 1px; border-radius: 9px; }
  .route-scroll-caption { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; color: #526c7c; font-size: .72rem; line-height: 1.4; }
  .route-scroll-caption svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
}

@media print {
  .route-tab .tab-topline { gap: 6px; }
  .route-tab .tab-bottomline { margin-top: 6px; gap: 6px; }
  .route-tab-icon svg { width: 20px; height: 20px; }
}
