/* mobile.css - phone-first home for Ward Reservation Weather */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #F3F2EB;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Verdana, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  -webkit-text-size-adjust: 100%;
}
.m-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 24px 0;
}
.m-header {
  background: #3173B1;
  color: #fff;
  padding: 12px 14px;
}
.m-header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.m-header .m-sub {
  margin: 4px 0 0 0;
  font-size: 0.8rem;
  opacity: 0.9;
}
.m-section {
  background: #fff;
  margin: 10px 10px 0 10px;
  border: 1px solid #CCCCCC;
  border-radius: 6px;
  overflow: hidden;
}
.m-section h2 {
  margin: 0;
  padding: 8px 12px;
  background: #3173B1;
  color: #fff;
  font-size: 0.95rem;
}
.m-section .m-body {
  padding: 10px 12px;
}
.m-alert {
  margin: 10px 10px 0 10px;
}
.m-windy {
  width: 100%;
  height: 200px;
  border: 0;
  display: block;
}
.m-credit {
  font-size: 0.75rem;
  color: #555;
  text-align: center;
  margin: 4px 0 0 0;
}
.m-hero-temp {
  text-align: center;
  padding: 8px 0 4px 0;
}
.m-hero-temp .val {
  font-size: 3rem;
  font-weight: 700;
  color: #3173B1;
  line-height: 1.1;
}
.m-hero-temp .cond {
  font-size: 1rem;
  color: #333;
  margin-top: 4px;
}
.m-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.m-card {
  background: #F1F8FE;
  border: 1px solid #CCCCCC;
  border-radius: 4px;
  padding: 10px 8px;
  text-align: center;
}
.m-card .label {
  font-size: 0.75rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.m-card .val {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  margin-top: 4px;
}

.m-card .time {
  font-size: 0.75rem;
  color: #666;
  margin-top: 2px;
}
.m-updated {
  text-align: center;
  font-size: 0.8rem;
  color: #444;
  margin: 8px 0 0 0;
}
.m-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px 10px 0 10px;
}
.m-nav a {
  display: inline-block;
  padding: 10px 14px;
  background: #3173B1;
  color: #fff !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}
.m-nav a.secondary {
  background: #F1F8FE;
  color: #3173B1 !important;
  border: 1px solid #3173B1;
}
.m-footer {
  text-align: center;
  font-size: 0.75rem;
  color: #666;
  padding: 16px 10px 8px 10px;
}
body.mobile-home .windVane {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 10px 0 !important;
}
body.mobile-home .windVane .wv-wrap {
  width: 160px;
  height: 160px;
}
body.mobile-home .windVane .wv-svg {
  width: 160px;
  height: 160px;
}
body.mobile-home .windHistory {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.mobile-home .windHistory #whCanvas {
  width: 100% !important;
  max-width: 100% !important;
  height: 160px !important;
}
body.mobile-home .windHistory .wh-btn {
  margin: 2px;
  padding: 6px 10px;
  font-size: 12px;
}
body.mobile-home .windHistory .data1 {
  padding: 8px 6px;
}
body.mobile-home .rainHistory {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
body.mobile-home .rainHistory #rhCanvas {
  width: 100% !important;
  max-width: 100% !important;
  height: 160px !important;
}
body.mobile-home .rainHistory .rh-btn {
  margin: 2px;
  padding: 6px 10px;
  font-size: 12px;
}
body.mobile-home .rainHistory .data1 {
  padding: 8px 6px;
}

/* Content pages */
.m-header a.m-home-link {
  color: #fff;
  text-decoration: none;
}
.m-nav a.active {
  background: #1e4f7a;
  box-shadow: inset 0 0 0 1px #fff;
}
.m-content {
  margin: 10px 10px 0 10px;
  background: #fff;
  border: 1px solid #CCCCCC;
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.m-content h1,
.m-content h2,
.m-content h3 {
  color: #3173B1;
  font-size: 1.1rem;
  margin: 0.6em 0 0.4em 0;
}
.m-content img {
  max-width: 100% !important;
  height: auto !important;
}
.m-content table {
  max-width: 100%;
  width: 100% !important;
  font-size: 0.85rem;
}
.m-content td,
.m-content th {
  word-wrap: break-word;
}
.m-content iframe {
  max-width: 100%;
}
.m-radar-frame {
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
  border-radius: 0 0 6px 6px;
}

/* Mobile forecast stacked cards — no horizontal scroll */
.m-forecast {
  overflow-x: hidden;
}
.m-fcst-head {
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #CCCCCC;
}
.m-fcst-loc {
  font-size: 1.05rem;
  font-weight: 700;
  color: #3173B1;
}
.m-fcst-meta {
  font-size: 0.8rem;
  color: #555;
  margin-top: 3px;
}
.m-fcst-warn {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
}
.m-fcst-card {
  border: 1px solid #CCCCCC;
  border-radius: 6px;
  background: #F1F8FE;
  padding: 10px 12px;
  margin: 0 0 10px 0;
}
.m-fcst-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.m-fcst-icon {
  width: 55px;
  height: 55px;
  flex: 0 0 55px;
  object-fit: contain;
}
.m-fcst-card-main {
  flex: 1 1 auto;
  min-width: 0;
}
.m-fcst-period {
  margin: 0 0 4px 0 !important;
  font-size: 1rem !important;
  color: #3173B1 !important;
}
.m-fcst-temp {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2px 0;
}
.m-fcst-cond {
  font-size: 0.9rem;
  color: #333;
}
.m-fcst-detail {
  margin: 8px 0 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #222;
}
.m-fcst-credit {
  font-size: 0.75rem;
  color: #666;
  text-align: center;
  margin: 14px 0 4px 0;
}

/* NOAA radar — exact-size iframe, centered, no gray letterbox */
.m-noaa-wrap {
  padding: 8px 0 4px 0 !important;
  overflow: hidden;
}
.m-noaa-radar {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  text-align: center;
  background: transparent;
  border-radius: 4px;
  line-height: 0;
}
.m-noaa-frame {
  display: block;
  margin: 0 auto !important;
  border: 0 !important;
  background: #808080;
  max-width: 100%;
}

/* Advisories — force fluid layout over desktop fixed widths */
.m-advisory {
  overflow-x: hidden;
}
.m-advisory > div,
.m-advisory table {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.m-advisory td {
  display: block;
  width: 100% !important;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.m-advisory img {
  max-width: 100% !important;
  height: auto !important;
}
.m-adv-map {
  margin-top: 12px;
  text-align: center;
}
.m-adv-map img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* NOAA: view-only on mobile — shield scrolls the page (HAniS traps iOS otherwise) */
.m-noaa-radar {
  position: relative;
}
.m-noaa-scrollsafe iframe.m-noaa-frame,
.m-noaa-scrollsafe #mNoaaRadar {
  pointer-events: none !important;
}
.m-noaa-scroll-shield {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  background: transparent;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}
