/* MeteoLab SK — 🚗 Cestná predpoveď KE ⇄ BA */

.route-body { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }

.route-top {
  display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(12px, 3vw, 24px);
  background: linear-gradient(180deg, var(--card) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.route-top .back-link {
  font-family: var(--font-display); font-size: .76rem; font-weight: 600;
  color: var(--azure); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px;
  background: var(--card); white-space: nowrap;
}
.route-title h1 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.route-title p { font-size: .68rem; color: var(--ink-soft); }
.route-top .spacer { flex: 1; }
.dir-btn {
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  border: 1px solid var(--line); background: var(--paper); color: var(--azure);
  border-radius: 999px; width: 38px; height: 38px; cursor: pointer;
  transition: transform .25s;
}
.dir-btn:hover { border-color: var(--azure); transform: rotate(180deg); }

.dep-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px clamp(12px, 3vw, 24px);
  background: var(--card); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; flex: 0 0 auto;
}
.dep-bar::-webkit-scrollbar { display: none; }
.dep-label { font-family: var(--font-display); font-size: .7rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.dep-chips { display: flex; gap: 6px; }
.dep-chips button {
  font-family: var(--font-display); font-size: .7rem; font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px;
  background: var(--paper); color: var(--ink); cursor: pointer; white-space: nowrap;
  touch-action: manipulation;
}
.dep-chips button.is-sel { background: var(--azure); border-color: var(--azure); color: #fff; }
.dep-verdict { font-size: .72rem; font-family: var(--font-display); font-weight: 700; white-space: nowrap; margin-left: auto; }

.route-main { display: flex; flex: 1; min-height: 0; }
#routeMap { flex: 1; min-width: 0; background: #dfe9f2; position: relative; }
[data-theme="dark"] #routeMap { background: #0b131b; }

.route-side {
  width: 400px; flex: 0 0 auto; border-left: 1px solid var(--line);
  background: var(--card); overflow-y: auto; padding: 12px 14px 22px;
}

.route-cards { display: flex; flex-direction: column; gap: 10px; }
.rcard {
  border: 2px solid var(--line); border-radius: 14px; background: var(--card);
  padding: 12px 13px 10px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .12s, box-shadow .12s;
}
.rcard:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.rcard.is-best { border-color: #2e7d32; background: linear-gradient(135deg, rgba(102,187,106,.10), transparent 60%); }
.rcard.is-sel { border-color: var(--azure); }
.rcard .rk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rcard .rk-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.rcard h3 { font-family: var(--font-display); font-size: .88rem; }
.rcard .rk-badge {
  font-family: var(--font-display); font-size: .6rem; font-weight: 700;
  border-radius: 999px; padding: 3px 9px; margin-left: auto;
}
.rk-badge.ok { background: #d9f2e3; color: #1b5e20; }
.rk-badge.mid { background: #fdeeca; color: #8a5a00; }
.rk-badge.bad { background: #fbd9c9; color: #99330a; }
[data-theme="dark"] .rk-badge.ok { background: #14301b; color: #9ae0a5; }
[data-theme="dark"] .rk-badge.mid { background: #2e2513; color: #f0c541; }
[data-theme="dark"] .rk-badge.bad { background: #331a10; color: #ff9c7a; }
.rcard .rk-meta { font-size: .66rem; color: var(--ink-soft); margin: 3px 0 6px; }
.rcard .rk-score { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.rcard .rk-score small { font-size: .6rem; font-weight: 600; color: var(--ink-soft); }
.rcard .rk-bar { height: 6px; border-radius: 4px; background: var(--paper); overflow: hidden; margin: 5px 0 8px; }
.rcard .rk-bar i { display: block; height: 100%; border-radius: 4px; }
.rcard .rk-strip { display: flex; gap: 3px; margin: 6px 0; }
.rcard .rk-strip span {
  flex: 1; text-align: center; font-size: .82rem; line-height: 1.6;
  background: var(--paper); border-radius: 6px; border: 1px solid var(--line);
}
.rcard .rk-worst { font-size: .68rem; line-height: 1.45; }
.rcard .rk-worst b { color: #c62828; }
[data-theme="dark"] .rcard .rk-worst b { color: #ff9c7a; }
.rcard .rk-info { font-size: .6rem; color: var(--ink-soft); margin-top: 5px; }
.rcard .rk-trophy { position: absolute; top: -6px; right: 10px; font-size: 1.5rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }

.route-note {
  font-size: .66rem; color: var(--ink-soft); line-height: 1.55;
  background: #fdf3e3; border: 1px solid #f3ddb0; border-radius: 10px;
  padding: 9px 11px; margin-top: 12px;
}
[data-theme="dark"] .route-note { background: #2e2513; border-color: #4a3c1c; }
.route-src { font-size: .6rem; color: var(--ink-soft); margin-top: 10px; line-height: 1.55; }
.route-src a { color: var(--azure); }

/* menovky bodov na mape */
.wp-label {
  font-family: var(--font-display); font-weight: 700; font-size: .66rem;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 7px; white-space: nowrap; transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(14,34,51,.25); pointer-events: none;
}
.wp-label.is-bad { border-color: #e53935; color: #c62828; }
[data-theme="dark"] .wp-label.is-bad { color: #ff9c7a; }
.wp-label small { font-weight: 500; font-size: .56rem; color: var(--ink-soft); }

/* animovaný ťah odporúčanej trasy */
.route-flow { stroke-dasharray: 10 14; animation: routeFlow 1.2s linear infinite; }
@keyframes routeFlow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .route-flow { animation: none; } }

@media (max-width: 900px) {
  .route-main { flex-direction: column; }
  #routeMap { flex: 0 0 42dvh; }
  .route-side { width: 100%; border-left: 0; border-top: 1px solid var(--line); flex: 1; }
  .dep-verdict { display: none; }
  .route-title p { display: none; }
}
