/* ──────────────────────────────────────────────────────────────────────
 * SurfCheck Spot Page — shared stylesheet
 * Loaded by /ireland/<county>/<spot>.html pages
 * ────────────────────────────────────────────────────────────────────── */

:root {
  --void: #0C2033; --abyss: #091929; --deep: #152C40;
  --surface: #1B3850; --raised: #24485E;
  --border-dim: rgba(50,120,170,0.28); --border: #2E6080;
  --tidal: #00D4AC; --tidal-glow: rgba(0,212,172,0.10);
  --amber: #F5A623; --storm: #E63946;
  --mist: #7AB8D4; --fog: #5A9AB8; --foam: #C8E4F2; --white: #EBF4FA;
  --fd: 'Space Grotesk', sans-serif;
  --fb: 'DM Sans', sans-serif;
  --fm: 'JetBrains Mono', monospace;
}
[data-theme="light"] {
  --void: #f2f6f9; --abyss: #f2f6f9; --deep: #f8fbfd;
  --surface: #ffffff; --raised: #f4f9fc;
  --border: #dde5ea; --border-dim: rgba(0,0,0,0.06);
  --tidal: #00A882; --tidal-glow: rgba(0,168,130,0.08);
  --amber: #B07800; --storm: #C0303A;
  --mist: #5A8AA0; --fog: #8AAFC0; --foam: #0C2033; --white: #0C2033;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { background: var(--void); color: var(--foam); font-family: var(--fb); line-height: 1.55; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ── NAV (matches ireland.html) ── */
.nav { position:sticky; top:0; z-index:200; height:50px; background:rgba(8,14,22,0.92); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-bottom:1px solid rgba(50,120,170,0.28); display:flex; align-items:center; justify-content:space-between; padding:0 24px; gap:16px; }
.nav-logo { font-family:'Space Grotesk',sans-serif; font-size:16px; font-weight:700; color:#EBF4FA; letter-spacing:.06em; display:flex; align-items:center; gap:9px; flex-shrink:0; text-decoration:none; }
.nav-logo span { color:#00D4AC; }
.nav-links { display:flex; align-items:center; gap:2px; overflow-x:auto; scrollbar-width:none; flex:1; }
.nav-links::-webkit-scrollbar { display:none; }
.nl { font-family:'DM Sans',sans-serif; font-size:13px; font-weight:500; color:#5A9AB8; letter-spacing:.03em; text-transform:uppercase; padding:5px 9px; border-radius:3px; white-space:nowrap; transition:color .15s, background .15s; text-decoration:none; }
.nl:hover { color:#00D4AC; background:rgba(0,212,172,0.10); }
.nl.on { color:#00D4AC; }
.nav-live { display:flex; align-items:center; gap:5px; font-family:'JetBrains Mono',monospace; font-size:10px; color:#00D4AC; letter-spacing:.08em; flex-shrink:0; }
.dot { width:5px; height:5px; background:#00D4AC; border-radius:50%; animation:blink 2s infinite; }
@keyframes blink { 0%,100% { opacity:1 } 50% { opacity:.3 } }
[data-theme="light"] .nav { background: #091929 !important; }
#theme-toggle { background:none; border:none; cursor:pointer; color:#5A9AB8; padding:4px; display:flex; align-items:center; opacity:0.7; transition:opacity .2s, color .2s; margin-left:8px; flex-shrink:0; }
#theme-toggle:hover { opacity:1; color:#00D4AC; }

/* ── PAGE ── */
.page { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }

/* Breadcrumb */
.crumb { font-family: var(--fm); font-size: 11px; color: var(--fog); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.crumb a { color: var(--mist); }
.crumb a:hover { color: var(--tidal); }
.crumb span { color: var(--fog); margin: 0 6px; }

/* Hero */
.hero-head { margin-bottom: 22px; }
.hero-head h1 { font-family: var(--fd); font-size: 2rem; font-weight: 700; color: var(--white); letter-spacing: -0.01em; margin-bottom: 8px; }
.hero-head .meta { font-size: 0.95rem; color: var(--mist); }
#updated-at { font-family: var(--fm); font-size: 0.72rem; color: var(--fog); margin-top: 4px; }
.hero-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-action { display: inline-flex; align-items: center; gap: 6px; font-family: var(--fm); font-size: 11px; color: var(--mist); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 11px; border: 1px solid var(--border); border-radius: 6px; transition: color .15s, border-color .15s, background .15s; }
.hero-action:hover { color: var(--tidal); border-color: var(--tidal); background: var(--tidal-glow); }

/* Webcam */
.cam-section { margin-bottom: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.cam-header { padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.cam-title { font-family: var(--fm); font-size: 11px; color: var(--tidal); letter-spacing: 1.5px; text-transform: uppercase; }
.cam-altlink { font-size: 12px; color: var(--mist); }
.cam-altlink:hover { color: var(--tidal); }
.webcam-wrap { overflow: hidden; position: relative; background: #000; height: 420px; }
.webcam-wrap iframe { width: 100%; height: calc(420px + var(--crop-offset, 150px)); border: none; display: block; transform: translateY(calc(-1 * var(--crop-offset, 150px))); background: #000; }

/* Now block */
.now-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 22px; display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 22px; align-items: center; }
.score-side { text-align: center; padding: 4px; border-right: 1px solid var(--border-dim); }
.score-number { font-family: var(--fd); font-size: 3rem; font-weight: 800; line-height: 1; }
.score-label { font-family: var(--fm); font-size: 11px; letter-spacing: 1.5px; margin-top: 6px; }
.now-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { text-align: center; }
.stat .lbl { font-family: var(--fm); font-size: 10px; color: var(--fog); letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 4px; }
.stat .val { font-family: var(--fd); font-size: 1.2rem; font-weight: 600; color: var(--foam); line-height: 1.1; }
.stat .sub { font-size: 0.7rem; color: var(--mist); margin-top: 2px; }
@media (max-width: 580px) {
  .now-card { grid-template-columns: 1fr; }
  .score-side { border-right: none; border-bottom: 1px solid var(--border-dim); padding-bottom: 12px; }
  .now-stats { gap: 10px; }
}

/* Guide */
.guide { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 24px; margin-bottom: 22px; }
.guide h2 { font-family: var(--fd); font-size: 1.05rem; font-weight: 600; color: var(--white); margin-bottom: 12px; letter-spacing: 0.01em; }
.guide p { font-size: 0.95rem; color: var(--foam); margin-bottom: 12px; }
.guide p:last-child { margin-bottom: 0; }
.guide strong { color: var(--white); font-weight: 600; }
.guide em { color: var(--tidal); font-style: normal; font-weight: 500; }

.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 18px; }
.fact { background: var(--raised); border-radius: 8px; padding: 10px 14px; border: 1px solid var(--border-dim); }
.fact .k { font-family: var(--fm); font-size: 10px; color: var(--fog); letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 4px; }
.fact .v { font-size: 0.9rem; color: var(--foam); }

.hazards { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-dim); }
.hazards h3 { font-family: var(--fm); font-size: 11px; color: var(--amber); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px; }
.hazards ul { list-style: none; padding: 0; }
.hazards li { font-size: 0.88rem; color: var(--foam); padding: 4px 0 4px 18px; position: relative; }
.hazards li::before { content: '⚠'; position: absolute; left: 0; color: var(--amber); font-size: 12px; }

/* Big-wave / red advisory callout — reusable across spots */
.advisory { background: rgba(230,57,70,0.10); border: 1px solid rgba(230,57,70,0.30); border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; color: var(--storm); font-weight: 600; font-size: 0.9rem; line-height: 1.5; list-style: none; }
.advisory::before { content: none !important; }

/* Forecast */
.forecast-section { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 22px; }
.forecast-section h2 { font-family: var(--fd); font-size: 1.05rem; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.forecast-hint { font-size: 0.75rem; color: var(--fog); margin-bottom: 14px; }
.forecast-rows { display: flex; flex-direction: column; }
.fc-row { display: grid; grid-template-columns: 70px 1fr 110px 64px 18px; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--border-dim); font-size: 0.85rem; cursor: pointer; transition: background .12s; }
.fc-row:last-of-type { border-bottom: none; }
.fc-row:hover { background: var(--tidal-glow); }
.fc-row.expanded { background: var(--tidal-glow); }
.fc-day { color: var(--mist); font-size: 0.78rem; }
.fc-day strong { color: var(--foam); font-weight: 600; display: block; font-size: 0.85rem; }
.fc-bar-wrap { display: flex; align-items: center; gap: 8px; }
.fc-bar { height: 6px; border-radius: 3px; min-width: 4px; flex-shrink: 0; }
.fc-detail { color: var(--mist); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-wind { font-size: 0.72rem; color: var(--mist); text-align: right; }
.fc-score { font-weight: 700; font-size: 0.95rem; text-align: right; font-family: var(--fd); }
.fc-caret { font-size: 10px; color: var(--fog); transition: transform .2s; text-align: center; }
.fc-row.expanded .fc-caret { transform: rotate(180deg); }

/* Hourly drawer */
.hourly-drawer { background: var(--abyss); border-bottom: 1px solid var(--border-dim); padding: 0; overflow-x: auto; }
.hourly-drawer[hidden] { display: none; }
[data-theme="light"] .hourly-drawer { background: #eaf1f6; }
.hourly-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; font-family: var(--fm); min-width: 480px; }
.hourly-table th { padding: 8px 8px 6px; color: var(--fog); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 1.2px; text-align: center; font-weight: 500; white-space: nowrap; border-bottom: 1px solid var(--border-dim); }
.hourly-table td { padding: 5px 8px; text-align: center; white-space: nowrap; color: var(--foam); border-bottom: 1px solid rgba(255,255,255,0.03); }
[data-theme="light"] .hourly-table td { border-bottom: 1px solid rgba(0,0,0,0.04); }
.hourly-table tr:last-child td { border-bottom: none; }
.hourly-table .h-time { color: var(--mist); font-weight: 600; }
.hourly-table .h-wind-good   { color: var(--tidal); }
.hourly-table .h-wind-fair   { color: var(--amber); }
.hourly-table .h-wind-bad    { color: var(--storm); }
.hourly-table .h-score       { font-weight: 700; }

@media (max-width: 580px) {
  .fc-row { grid-template-columns: 56px 1fr 60px 16px; gap: 8px; }
  .fc-wind { display: none; }
  .hourly-table { min-width: 420px; font-size: 0.68rem; }
  .hourly-table th, .hourly-table td { padding: 4px 6px; }
}

/* Footer */
.other-spots { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.other-spots h2 { font-family: var(--fm); font-size: 11px; color: var(--tidal); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px; }
.other-spots-list { display: flex; flex-wrap: wrap; gap: 8px; }
.other-spot { background: var(--raised); border: 1px solid var(--border-dim); padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; color: var(--foam); transition: border-color .15s, color .15s; }
.other-spot:hover { border-color: var(--tidal); color: var(--tidal); }
.back-to-county { margin-top: 14px; font-size: 0.85rem; color: var(--mist); }
.back-to-county a { color: var(--tidal); }

/* Loading */
.loading { text-align: center; color: var(--mist); padding: 24px; font-size: 0.85rem; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--border); border-top-color: var(--tidal); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
