/* ============================================================
   Trail Conditions — Today / trail detail
   Hero card, section wrapper, hourly scroll, past-rain grid,
   conditions grid, drying outlook, soil card, tab bar,
   AI narrative, condition report buttons, Weekly Plan CTA.
   Also used by plan.html for hero card + shared components.
   ============================================================ */

/* ── Hero card (today / plan pages) ────────────────────── */
.hero-card {
  background: #fff;
  border-radius: 18px;
  border: 2px solid var(--forest);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.hero-trail-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--forest);
  line-height: 1.2;
  max-width: 65%;
}
.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  color: #fff;
}
.hero-status-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.hero-stat {
  background: var(--dirt);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}
.hero-stat-val {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--forest);
  line-height: 1;
}
.hero-stat-val sup { font-size: 0.75rem; }
.hero-stat-lbl {
  font-size: 0.67rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.hero-stat-boost {
  font-size: 0.63rem;
  color: #1a6b9a;
  margin-top: 0.1rem;
}
.hero-drain {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-drain-label {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.hero-drain-desc {
  font-size: 0.68rem;
  color: var(--muted);
}
.drain-fast    { background: #e6f4ec; color: #1a6b30; }
.drain-avg     { background: #f0f0f0; color: #555;    }
.drain-slow    { background: #fff3e0; color: #b06000; }
.drain-slowest { background: #fdf0e6; color: var(--orange); }

.hero-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.85rem 0 0.6rem;
}
.hero-updated {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.hero-updated .dot-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* Inside hero card, ride-window summaries are plain text (no background strips) */
/* Base .ride-window-summary rules live in dashboard.css */
.hero-card .ride-window-summary {
  padding: 0;
  border: none;
  background: none;
  font-size: 0.82rem;
  font-weight: 500;
}
.hero-card .ride-window-summary.good { background: none; color: var(--green); }
.hero-card .ride-window-summary.warn { background: none; color: var(--amber); }
.hero-card .ride-window-summary.bad  { background: none; color: var(--orange); }

/* ── Section (white card wrapper) ──────────────────────── */
.section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.section-header {
  padding: 0.85rem 1rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.rainsense-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--blue);
  opacity: 0.7;
  margin-left: 0.4rem;
}

/* ── Hourly scroll ──────────────────────────────────────── */
.hourly-scroll {
  display: flex;
  overflow-x: auto;
  padding: 0.75rem 0.75rem 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hourly-scroll::-webkit-scrollbar { display: none; }
.hour-cell {
  flex-shrink: 0;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.hour-time { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.hour-time.now { color: var(--blue); font-weight: 700; }
.hour-icon { font-size: 1.35rem; line-height: 1; }
.hour-temp { font-size: 0.85rem; font-weight: 600; }
.hour-bar-wrap {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: flex-end;
}
.hour-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 0;
}
.hour-amt {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--blue);
  height: 1rem;
  text-align: center;
  line-height: 1;
}

/* ── Past rain grid ─────────────────────────────────────── */
.past-rain-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.75rem 1rem 1rem;
  gap: 0.5rem;
}
.past-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}
.past-day-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.past-bar-wrap {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: flex-end;
}
.past-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: #4a85b8;
  min-height: 0;
}
.past-amt {
  font-size: 0.62rem;
  font-weight: 600;
  color: #4a85b8;
  height: 1rem;
  text-align: center;
  line-height: 1;
}
.past-rain-grid .today-col {
  border-left: 1.5px dashed var(--border);
  padding-left: 0.5rem;
  margin-left: -0.25rem;
}

/* ── Conditions grid ────────────────────────────────────── */
.cond-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 480px) {
  .cond-grid { grid-template-columns: repeat(2, 1fr); }
}
.cond-cell {
  padding: 0.9rem 1rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cond-cell:nth-child(4n)      { border-right: none; }
.cond-cell:nth-last-child(-n+4) { border-bottom: none; }
@media (max-width: 480px) {
  .cond-cell:nth-child(2n) { border-right: none; }
  .cond-cell:nth-last-child(-n+2) { border-bottom: none; }
}
.cond-icon { font-size: 1.1rem; margin-bottom: 0.2rem; }
.cond-val  { font-size: 1.05rem; font-weight: 600; }
.cond-lbl  { font-size: 0.67rem; color: var(--muted); margin-top: 0.1rem; }

/* ── Weekly Plan CTA ────────────────────────────────────── */
.plan-cta {
  display: block;
  background: var(--forest);
  color: #fff;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: opacity 0.12s;
}
.plan-cta:hover { opacity: 0.9; }
button.plan-cta { width: 100%; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; text-align: left; }
.plan-cta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.plan-cta-text { font-size: 1rem; font-weight: 600; }
.plan-cta-sub  { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 0.2rem; }
.plan-cta-arrow { font-size: 1.4rem; line-height: 1; }
.plan-cta-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.strip-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.strip-lbl {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.strip-chip {
  width: 100%;
  height: 6px;
  border-radius: 3px;
}

/* ── Drying outlook ─────────────────────────────────────── */
.drying-card { padding: 1rem; }
.drying-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.drying-row:last-child { border-bottom: none; }
.drying-time { font-size: 0.8rem; font-weight: 600; min-width: 60px; color: var(--muted); }
.drying-bar {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}
.drying-seg { height: 100%; }
.seg-wet     { background: var(--orange); }
.seg-caution { background: var(--amber); }
.seg-open    { background: var(--green); }
.drying-label { font-size: 0.75rem; font-weight: 600; min-width: 60px; text-align: right; }
.drying-label.s-open    { color: var(--green); }
.drying-label.s-caution { color: var(--amber); }
.drying-label.s-wet     { color: var(--orange); }

/* ── Today page drying outlook ──────────────────────────── */
.today-drying-card { padding: 0.75rem 1rem 1rem; }
.today-drying-milestone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-top: 0.45rem;
  color: #333;
}
.today-drying-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Soil info card ─────────────────────────────────────── */
.soil-card {
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.soil-badge {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--forest);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.soil-info-name { font-size: 0.85rem; font-weight: 600; }
.soil-info-desc { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.4; }

/* ── Tab bar ─────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
}
.tab {
  background: none;
  border: none;
  padding: 0.55rem 1rem 0.45rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color 0.12s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--forest);
  font-weight: 600;
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--forest);
}

/* ── AI narrative ────────────────────────────────────────── */
.narrative-box {
  margin: 0 0.75rem 0.65rem;
  padding: 0.65rem 1rem;
  background: #fff;
  border-radius: 10px;
  border-left: 3px solid var(--forest);
  font-size: 0.83rem;
  color: #444;
  line-height: 1.55;
  font-style: italic;
}

/* ── Condition report buttons ────────────────────────────── */
.report-section {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1rem 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}
.report-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.report-btns {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.report-btn {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s;
}
.report-btn:active { opacity: 0.75; }
.report-drier  { background: #e6f4ec; color: #1a5c34; }
.report-about  { background: #f0f0ee; color: #444; }
.report-wetter { background: #fff3e0; color: #8a4a00; }
.report-thanks {
  font-size: 0.85rem;
  color: #2d8c4e;
  font-weight: 600;
  padding: 0.25rem 0;
}
.report-summary {
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0ee;
}
.report-summary-title {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.report-summary-counts {
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.rsc-item { text-align: center; }
.rsc-num  { font-size: 1.15rem; font-weight: 700; line-height: 1; }
.rsc-lbl  { font-size: 0.68rem; color: var(--muted); margin-top: 0.2rem; }
.rsc-drier  .rsc-num { color: #1a5c34; }
.rsc-about  .rsc-num { color: #555; }
.rsc-wetter .rsc-num { color: #8a4a00; }
