/* Aibhneacha & Sléibhte na hÉireann - Stylesheet */
:root {
  --navy: #0f2b48;
  --emerald: #10b981;
  --shamrock: #059669;
  --dark-green: #064e3b;
  --river-blue: #0284c7;
  --river-glow: #38bdf8;
  --lake-blue: #0ea5e9;
  --mountain-rock: #78350f;
  --mountain-peak: #b45309;
  --amber: #f59e0b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --line: #e2e8f0;
  --muted: #64748b;
  --text: #1e293b;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Lexend', system-ui, sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow: 0 10px 25px -5px rgba(15, 43, 72, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: var(--surface);
  border-bottom: 2px solid var(--line);
  padding: 0.8rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.back-link {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  background: #f1f5f9;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  transition: all 0.2s;
}
.back-link:hover { color: var(--navy); background: #e2e8f0; }
.logo-icon {
  font-size: 2rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}
.subtitle {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Header Stats */
.header-stats {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.stat-pill {
  background: #f1f5f9;
  border: 1px solid var(--line);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stat-label { color: var(--muted); font-weight: 600; }
.stat-val { color: var(--navy); font-weight: 800; }
.ctrl-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}
.ctrl-btn:hover { background: #f8fafc; border-color: var(--muted); }

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.2rem;
  width: 100%;
  flex: 1;
}

/* Mode Navigation Tabs */
.mode-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  background: #e2e8f0;
  padding: 0.35rem;
  border-radius: 16px;
  overflow-x: auto;
}
.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.mode-tab:hover { color: var(--navy); }
.mode-tab.active {
  background: var(--surface);
  color: var(--river-blue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Geographic Dashboard */
.geo-dashboard {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 950px) {
  .geo-dashboard { grid-template-columns: 1fr; }
}

/* Map View Panel */
.map-view-panel {
  background: #0284c7;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.map-toolbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  color: #fff;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.toolbar-title { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.layer-toggles { display: flex; gap: 0.8rem; font-weight: 700; }
.layer-toggles label { cursor: pointer; display: flex; align-items: center; gap: 0.3rem; }

.svg-map-wrap {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 520 / 620;
}
#ireland-geo-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

/* SVG Map Elements */
.island-landmass {
  fill: #34d399;
  stroke: #059669;
  stroke-width: 3;
}
.geo-lake {
  fill: #0284c7;
  stroke: #38bdf8;
  stroke-width: 1.5;
  cursor: pointer;
  transition: all 0.2s;
}
.geo-lake:hover { fill: #0ea5e9; stroke: #fff; }

.geo-river {
  fill: none;
  stroke: #0284c7;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
  transition: all 0.2s;
}
.geo-river:hover, .geo-river.active {
  stroke: #38bdf8;
  stroke-width: 6;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8));
}

.geo-mountain {
  cursor: pointer;
  transition: transform 0.2s;
}
.geo-mountain polygon {
  fill: #78350f;
  stroke: #fef3c7;
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.geo-mountain:hover, .geo-mountain.active {
  transform: scale(1.3);
}
.geo-mountain.active polygon {
  fill: #ea580c;
  stroke: #fff;
}
.hotspot-ring { fill: transparent; }

.coastal-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  fill: #082f49;
  cursor: pointer;
  background: #fff;
}
.coastal-label:hover { fill: #fff; font-size: 12px; }

/* Detail Card & Inspector */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.feat-type-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0284c7;
  background: #e0f2fe;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.3rem;
}
.feat-card-header h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
}
.feat-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.2rem; }

.feat-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.metric-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
.m-title { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.m-val { display: block; font-size: 1rem; font-weight: 800; color: var(--navy); margin-top: 0.15rem; }

.feat-fact-box {
  background: #f0fdf4;
  border-left: 4px solid var(--emerald);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
}
.fact-head { font-size: 0.78rem; font-weight: 800; color: #166534; text-transform: uppercase; }
.feat-fact-box p { font-size: 0.88rem; color: #14532d; margin-top: 0.25rem; line-height: 1.45; }

.quick-feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.quick-chip {
  background: #f1f5f9;
  border: 1px solid var(--line);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s;
}
.quick-chip:hover { border-color: var(--river-blue); color: var(--river-blue); }
.quick-chip.active { background: var(--river-blue); color: #fff; border-color: var(--river-blue); }

/* Locator Mission Box */
.locator-mission-card {
  background: var(--surface);
  border: 2px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow);
}
.mission-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.locator-mission-card h4 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--navy); margin: 0.5rem 0 0.2rem; }
.locator-mission-card p { font-size: 0.88rem; color: var(--muted); }
.target-feedback { margin-top: 0.8rem; font-size: 0.95rem; font-weight: 700; min-height: 24px; }
