/*
Theme Name: WAARC
Theme URI: https://wadenaham.org
Description: Modern, responsive theme for the Wadena Area Amateur Radio Club (N0WN),
             Wadena, Minnesota. Block child theme of Twenty Twenty-Five.
Author: Wadena Area Amateur Radio Club
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.1
Template: twentytwentyfive
Text Domain: waarc
*/

/* ---------------------------------------------------------------------------
   Only what theme.json cannot express. Colours, type scale and spacing all
   live in theme.json so the club can adjust them in the Site Editor.
   --------------------------------------------------------------------------- */

/* Callsign / frequency figures: tabular so columns of numbers line up. */
.waarc-freq {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  font-weight: 600;
}

/* Repeater + link cards ------------------------------------------------- */
.waarc-card {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  background: var(--wp--preset--color--base);
  height: 100%;
}

.waarc-card h3,
.waarc-card h4 { margin-top: 0; }

/* A repeater's key numbers, as a definition grid rather than a table so it
   reflows cleanly on a phone. */
.waarc-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
  font-size: 0.95rem;
}
.waarc-specs dt { color: var(--wp--preset--color--muted-text); }
.waarc-specs dd { margin: 0; font-variant-numeric: tabular-nums; }

/* Live panels (band conditions, weather, toolbox) ------------------------ */
.waarc-panel {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--wp--preset--color--base);
}
.waarc-panel__head {
  background: var(--wp--preset--color--primary);
  color: #fff;
  padding: 0.7rem 1.1rem;
  font-weight: 600;
  font-size: 1.05rem;
}
.waarc-panel__body { padding: 1.1rem; }
.waarc-panel__note {
  font-size: 0.82rem;
  color: var(--wp--preset--color--muted-text);
  margin-top: 0.8rem;
}

/* Wide embeds (solar widget, aurora map) must never overflow a phone. */
.waarc-panel__body img { max-width: 100%; height: auto; }

/* Band-conditions layout. The N0NBH widget is a fixed tall/narrow image and
   the aurora map is square; pairing the map with the caption text keeps the
   two columns closer in height instead of leaving a tall empty gap. */
.waarc-solar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}
.waarc-solar__widget { flex: 0 1 auto; }
.waarc-solar__aurora {
  flex: 1 1 300px;
  min-width: min(100%, 280px);
}
.waarc-solar__aurora img { width: 100%; max-width: 440px; }

/* On a phone both stack and fill the width. */
@media (max-width: 600px) {
  .waarc-solar { gap: 1rem; }
  .waarc-solar__widget { flex-basis: 100%; }
}

/* Weather alert states. Colour is never the only signal — each state also
   carries a text label — so this stays readable for colour-blind users. */
.waarc-alert {
  border-left: 4px solid;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
}
.waarc-alert--none    { border-color: #1c7a3e; background: #eef8f1; }
.waarc-alert--watch   { border-color: #b8860b; background: #fdf6e3; }
.waarc-alert--warning { border-color: #b3261e; background: #fdeceb; }
.waarc-alert--error   { border-color: #6b7280; background: #f3f4f6; }
.waarc-alert__event   { font-weight: 700; }

/* Button row ------------------------------------------------------------- */
.waarc-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.waarc-links a {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: var(--wp--preset--color--primary);
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.waarc-links a:hover,
.waarc-links a:focus { background: var(--wp--preset--color--primary-dark); }
/* Keyboard focus must stay visible. */
.waarc-links a:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
}

/* Callsign lookup -------------------------------------------------------- */
.waarc-lookup { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.waarc-lookup input[type="text"] {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 6px;
  font-size: 1rem;
  text-transform: uppercase;
  min-width: 11rem;
}
.waarc-lookup button {
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 6px;
  background: var(--wp--preset--color--primary);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}
.waarc-result { margin-top: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
