/* Forecast Modal — utility-bar weather icon opens a 4-island tabbed forecast.
   Reuses the .hg-weather-* day-grid classes from weather-widget-v1.css for
   visual parity with the beach-page weather pill modal. Only the tab bar,
   container spacing, footer links, and error state are scoped here with
   .hg-fcm-* classes. Uses px sizing throughout because the site base
   font-size is 62.5% and rem values render ~40% smaller than expected. */

.hg-fcm{
  max-width:720px;
  margin:0 auto;
  padding:0 4px;
}

.hg-fcm-title{
  margin:0 0 14px;
  font-size:22px;
  font-weight:700;
  color:#222;
  text-align:center;
  line-height:1.2;
}

/* ── Island tab bar ──────────────────────────────────────────── */

.hg-fcm-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 16px;
  padding:6px;
  background:#f3f5f7;
  border-radius:12px;
}

.hg-fcm-tab{
  flex:1 1 auto;
  min-width:72px;
  padding:8px 6px 9px;
  border:none;
  border-radius:8px;
  background:transparent;
  color:#444;
  font-family:inherit;
  font-size:13px;
  font-weight:700;
  letter-spacing:.2px;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, box-shadow .15s ease;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  line-height:1.15;
  -webkit-appearance:none;
  appearance:none;
}
.hg-fcm-tab:hover{background:#e5eaef;color:#222}
.hg-fcm-tab:focus{outline:2px solid #1866B4;outline-offset:2px}

/* Island shape lives ABOVE the label — constant color regardless of active
   state so readers build a consistent shape + color mental model across the
   site (matches island nav, guidebook accents, etc.). */
.hg-fcm-tab-icon{
  font-size:20px;
  line-height:1;
  display:block;
}
.hg-fcm-tab-name{
  display:block;
  white-space:nowrap;
}

.hg-fcm-tab[data-island="oahu"] .hg-fcm-tab-icon{color:#F27A24}
.hg-fcm-tab[data-island="maui"] .hg-fcm-tab-icon{color:#1866B4}
.hg-fcm-tab[data-island="big-island"] .hg-fcm-tab-icon{color:#c3232f}
.hg-fcm-tab[data-island="kauai"] .hg-fcm-tab-icon{color:#1D9771}

.hg-fcm-tab.is-active{
  background:#fff;
  color:#1866B4;
  box-shadow:0 1px 3px rgba(0,0,0,.12);
}

/* Label color on the active tab matches the island brand color */
.hg-fcm-tab[data-island="oahu"].is-active{color:#F27A24}
.hg-fcm-tab[data-island="maui"].is-active{color:#1866B4}
.hg-fcm-tab[data-island="big-island"].is-active{color:#c3232f}
.hg-fcm-tab[data-island="kauai"].is-active{color:#1D9771}

/* ── Current-conditions stat strip ───────────────────────────── */
/* Wind / Humidity / Feels like / Sun — sits between the headline and
   the 7-day grid. Each stat renders only if the field is present, so
   older cached payloads degrade gracefully. */

.hg-fcm-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin:-4px 0 14px;
  padding:10px 12px;
  background:#f8fafb;
  border:1px solid #eceff2;
  border-radius:8px;
}
.hg-fcm-stat{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  text-align:center;
  min-width:0;
}
.hg-fcm-stat-label{
  font-size:11px;
  font-weight:700;
  color:#888;
  text-transform:uppercase;
  letter-spacing:.4px;
  line-height:1;
}
.hg-fcm-stat-value{
  font-size:14px;
  font-weight:700;
  color:#222;
  line-height:1.2;
  white-space:nowrap;
}
@media (max-width:520px){
  .hg-fcm-stats{grid-template-columns:repeat(2,1fr);gap:6px;padding:8px 10px}
  .hg-fcm-stat-value{font-size:13px}
}

/* ── Content states ──────────────────────────────────────────── */

.hg-fcm-content{
  min-height:220px;
}

.hg-fcm-loading,
.hg-fcm-error{
  padding:40px 10px;
  text-align:center;
  font-size:15px;
  color:#666;
  line-height:1.5;
}
.hg-fcm-error a{
  color:#1866B4;
  font-weight:700;
  text-decoration:none;
}
.hg-fcm-error a:hover{text-decoration:underline}
.hg-fcm-error-reason{
  font-size:12px;
  color:#aaa;
  font-weight:400;
}

/* ── Footer links + attribution ─────────────────────────────── */

.hg-fcm-links{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
  padding-top:16px;
  border-top:1px solid #eceff2;
}

.hg-fcm-link{
  font-size:14px;
  font-weight:700;
  color:#1866B4;
  text-decoration:none;
  line-height:1.3;
}
.hg-fcm-link:hover{text-decoration:underline}

/* Related-conditions row — "Also today" links to /ocean-report,
   /sunrise-sunset, /jellyfish-calendar. Keeps the "Weather" label
   narrow while surfacing adjacent tools readers often want next. */
.hg-fcm-related{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 14px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px dashed #e6e9ec;
  font-size:13px;
}
.hg-fcm-related-label{
  color:#888;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  font-size:11px;
}
.hg-fcm-related-link{
  color:#333;
  text-decoration:none;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}
.hg-fcm-related-link i{color:#1866B4;font-size:14px;line-height:1}
.hg-fcm-related-link:hover{color:#1866B4;text-decoration:underline}
.hg-fcm-related-link:hover i{color:#1866B4}

.hg-fcm-attr{
  margin-top:22px;
  padding-top:6px;
  font-size:12px;
  color:#888;
  text-align:center;
}
.hg-fcm-attr a{color:#888;text-decoration:underline}
.hg-fcm-attr a:hover{color:#1866B4}

/* ── Mobile refinements ──────────────────────────────────────── */

@media (max-width:520px){
  .hg-fcm-title{font-size:19px;margin-bottom:10px}
  .hg-fcm-tab{font-size:12px;padding:7px 4px 8px;min-width:56px;gap:2px}
  .hg-fcm-tab-icon{font-size:18px}
  .hg-fcm-links{flex-direction:column;align-items:flex-start}
}

/* Print: hide the modal entirely — weather is time-sensitive */
@media print{
  .forecast-modal{display:none !important}
}
