/* ============================================================
   DTE Energy Foundation Trail — Detail Page Styles
   Extends /css/styles.css — do not duplicate tokens or resets.
   ============================================================ */

/* ── Body override (detail page uses full-height, no max-width padding) ── */
body {
  min-height: 100vh;
  padding: 0;
  max-width: none;
}

/* ── NAV ──────────────────────────────────────────────────── */
nav {
  background: var(--forest);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: 'DM Serif Display', serif;
  color: #fff;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-brand span { color: #8fc9a5; }

.nav-back {
  color: #8fc9a5;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s;
}

.nav-back:hover { color: #fff; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: #8fc9a5;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-link:hover { color: #fff; }

/* ── HERO BANNER ──────────────────────────────────────────── */
.hero {
  background: var(--forest);
  padding: 2rem 1.5rem 2.5rem;
  color: #fff;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fc9a5;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: #adc9b7;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ── STATUS CARD ──────────────────────────────────────────── */
.status-section { padding: 1.25rem 1.5rem; }

.status-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.status-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--green-lt);
  border-left: 6px solid var(--green);
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(45,140,78,0.2);
  animation: statusPulse 2.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(45,140,78,0.2); }
  50%       { box-shadow: 0 0 0 7px rgba(45,140,78,0.08); }
}

.status-label {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--green);
}

.status-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.status-updated {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

/* Status variants */
.status-card.wet .status-main     { background: var(--orange-lt); border-left-color: var(--orange); }
.status-card.wet .status-dot      { background: var(--orange); box-shadow: 0 0 0 3px rgba(192,96,32,0.2); animation: none; }
.status-card.wet .status-label    { color: var(--orange); }

.status-card.caution .status-main  { background: var(--amber-lt); border-left-color: var(--amber); }
.status-card.caution .status-dot   { background: var(--amber); box-shadow: 0 0 0 3px rgba(212,133,10,0.2); animation: none; }
.status-card.caution .status-label { color: var(--amber); }

.status-card.rain .status-main    { background: var(--blue-lt); border-left-color: var(--blue); }
.status-card.rain .status-dot     { background: var(--blue); box-shadow: 0 0 0 3px rgba(26,107,154,0.2); animation: none; }
.status-card.rain .status-label   { color: var(--blue); }

.status-card.rideNow .status-main  { background: #fff3cd; border-left-color: #b07d10; }
.status-card.rideNow .status-dot   { background: #b07d10; box-shadow: 0 0 0 3px rgba(176,125,16,0.2); animation: none; }
.status-card.rideNow .status-label { color: #b07d10; }

/* ── OVERRIDE BADGE ───────────────────────────────────────── */
.override-badge {
  background: var(--forest);
  color: #8fc9a5;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.override-badge svg { flex-shrink: 0; }

/* ── STATS ROW ────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 1.5rem;
}

.stat-box {
  background: #fff;
  padding: 1rem 0.75rem;
  text-align: center;
}

.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--forest);
  line-height: 1;
}

.stat-value.good { color: var(--green); }
.stat-value.warn { color: var(--amber); }
.stat-value.bad  { color: var(--orange); }

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── SECTION ──────────────────────────────────────────────── */
section { padding: 1.5rem 1.5rem 0; }

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--forest);
  margin-bottom: 1rem;
}

/* ── RAINFALL CHART ───────────────────────────────────────── */
.chart-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1rem 0.75rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.chart-sub    { font-size: 0.78rem; color: var(--text-muted); }

.chart-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.bars-area {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  margin-bottom: 0.4rem;
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: opacity 0.2s;
}

.bar.actual   { background: var(--blue); }
.bar.forecast { background: #b8d8ec; }

.bar-date {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-align: center;
  white-space: nowrap;
}

.bar-today .bar-date { color: var(--forest); font-weight: 600; }

/* ── DRYING FORECAST TIMELINE ─────────────────────────────── */
.drying-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.drying-timeline { display: flex; flex-direction: column; gap: 0; }

.drying-step {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--dirt-dark);
}

.drying-step:last-child { border-bottom: none; }

.drying-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.drying-icon.green { background: var(--green-lt); }
.drying-icon.amber { background: var(--amber-lt); }
.drying-icon.now   { background: var(--blue-lt); }

.drying-time { font-weight: 600; font-size: 0.9rem; color: var(--forest); }
.drying-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ── TRAIL INFO ───────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.info-card.full { grid-column: 1 / -1; }

.info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.info-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--forest);
}

.soil-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-lt);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  margin-top: 0.3rem;
}

/* ── DISCLAIMER ───────────────────────────────────────────── */
.disclaimer {
  margin: 1.5rem 1.5rem;
  background: var(--dirt-dark);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.disclaimer strong { color: var(--text); }

/* ── EXTERNAL LINKS ───────────────────────────────────────── */
.links-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 1.5rem 1.5rem;
}

.ext-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--forest);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
}

.ext-link:hover { background: var(--green-lt); border-color: var(--green); }

.ext-link-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.1rem;
}

.ext-link svg { color: var(--text-muted); flex-shrink: 0; }

/* ── PAGE FOOTER ──────────────────────────────────────────── */
footer {
  background: var(--forest);
  padding: 1.5rem;
  text-align: center;
  color: #8fc9a5;
  font-size: 0.78rem;
  margin-top: 1.5rem;
}

footer a { color: #8fc9a5; }

/* ── LOADING SHIMMER ──────────────────────────────────────── */
.loading-shimmer {
  background: linear-gradient(90deg, #e8e2d5 25%, #f0ebe0 50%, #e8e2d5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  height: 1em;
  display: inline-block;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── RIDE WINDOW ──────────────────────────────────────────── */
.ride-window-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.ride-summary {
  padding: 0.9rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--forest);
  border-bottom: 1px solid var(--border);
  background: var(--dirt);
  line-height: 1.4;
}

.ride-summary.good { background: var(--green-lt); color: #1a5c30; }
.ride-summary.warn { background: var(--amber-lt); color: #7a5000; }
.ride-summary.bad  { background: var(--blue-lt);  color: #0f4060; }

.ride-hours {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}

.ride-hour {
  background: #fff;
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.ride-hour-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.ride-hour-icon { font-size: 1.3rem; line-height: 1; margin-bottom: 0.3rem; }

.ride-hour-prob           { font-size: 0.72rem; color: var(--muted); }
.ride-hour-prob.warn      { color: var(--amber); font-weight: 600; }
.ride-hour-prob.bad       { color: var(--blue);  font-weight: 600; }
.ride-hour-mm             { font-size: 0.68rem; color: var(--muted); margin-top: 0.1rem; }
.ride-hour-temp           { font-size: 0.75rem; font-weight: 500; color: var(--text); margin-top: 0.15rem; line-height: 1.3; }

.ride-assumption {
  padding: 0.55rem 1.25rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ── OUTLOOK BLOCKS (hours 4–16) ─────────────────────────── */
.outlook-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}

.outlook-block {
  background: #fff;
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.outlook-block-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.outlook-block-prob           { font-size: 0.88rem; font-weight: 600; color: var(--muted); margin-bottom: 0.2rem; }
.outlook-block-prob.good      { color: var(--green); }
.outlook-block-prob.warn      { color: var(--amber); }
.outlook-block-prob.bad       { color: var(--blue); }
.outlook-block-mm             { font-size: 0.75rem; color: var(--muted); }

/* ── DRYING CONDITIONS CARD ───────────────────────────────── */
.drying-conditions-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.dc-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0;
}

.dc-icon { font-size: 1.4rem; width: 36px; text-align: center; flex-shrink: 0; }

.dc-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.dc-value { font-size: 0.95rem; font-weight: 500; color: var(--forest); margin-top: 0.1rem; }

.dc-divider { height: 1px; background: var(--dirt-dark); margin: 0.25rem 0; }

.dc-modifier {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dirt-dark);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.dc-modifier.good { color: #1a5c30; }
.dc-modifier.warn { color: #7a5000; }

/* ── OVERRIDE NOTICE ──────────────────────────────────────── */
.override-notice {
  background: var(--amber-lt);
  border: 1px solid #e8c56a;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: #7a5a00;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0 1.5rem;
}

.override-notice svg { flex-shrink: 0; margin-top: 1px; }

/* ── MOBILE TWEAKS ────────────────────────────────────────── */
@media (max-width: 400px) {
  .stats-row  { grid-template-columns: repeat(2, 1fr); }
  .ride-hours { grid-template-columns: repeat(2, 1fr); }
  .info-grid  { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.3rem; }
}
