/* =========================================================
   AGC ANGLIA: LOCAL WATTISHAM WEATHER & NOTAM DASHBOARD
   Scoped cleanly inside #agc-weather-app for Neve + WP
   ========================================================= */

/* Neve full-width subpage integration */
body.page-slug-weather .nv-page-title-wrap,
body.page-weather .nv-page-title-wrap,
.nv-single-page-wrap:has(#agc-weather-app) .nv-page-title-wrap {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page-slug-weather #content,
body.page-slug-weather .neve-main,
body.page-slug-weather .single-page-container,
body.page-slug-weather .nv-single-page-wrap,
body.page-slug-weather .nv-content-wrap,
body.page-slug-weather .entry-content {
  max-width: 100% !important;
  width: 100% !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.page-slug-weather .nv-sidebar-wrap {
  display: none !important;
}

#agc-weather-app {
  font-family: var(--agc-font-body, Arial, Helvetica, sans-serif);
  color: #111827;
  background: #f1f5f9;
  font-size: 16px;
  scroll-behavior: smooth;
  padding-bottom: 40px;
}

#agc-weather-app *,
#agc-weather-app *::before,
#agc-weather-app *::after {
  box-sizing: border-box;
}

/* Sub-hero header (normal flow by default; extra top padding when fixed nav is active) */
#agc-weather-app .agc-w-header {
  background: #071324;
  color: #ffffff;
  padding: 28px 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 5px solid #fcaf3b;
  gap: 24px;
}

#agc-weather-app.agc-has-fixed-nav .agc-w-header {
  padding-top: 112px;
}

#agc-weather-app .brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

#agc-weather-app .brand img {
  width: 88px;
  height: 94px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 6px;
  padding: 5px;
}

#agc-weather-app .eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  display: inline-block;
  color: #fcaf3b;
}

#agc-weather-app .agc-w-header h1 {
  font-family: var(--agc-font-head, Arial, Helvetica, sans-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 6px 0;
  color: #ffffff;
}

#agc-weather-app .agc-w-header p {
  margin: 0;
  color: #e5e7eb;
  font-size: .9rem;
}

#agc-weather-app button,
#agc-weather-app a {
  touch-action: manipulation;
}

#agc-weather-app button {
  font: inherit;
  cursor: pointer;
  border: 1px solid #bdccd8;
  border-radius: 5px;
  padding: 11px 16px;
  background: #fff;
  color: #111827;
  font-weight: 600;
}

#agc-weather-app button:hover {
  background: #fff1d9;
}

#agc-weather-app button:focus-visible,
#agc-weather-app a:focus-visible {
  outline: 3px solid #ab641d;
  outline-offset: 3px;
}

#agc-weather-app .headeractions {
  display: flex;
  gap: 10px;
  align-items: center;
}

#agc-weather-app .agc-w-header button {
  color: #ffffff;
  background: transparent;
  border-color: #fcaf3b;
  white-space: nowrap;
}

#agc-weather-app .agc-w-header button:hover {
  background: #fcaf3b;
  color: #111827;
}

#agc-weather-app .club-link {
  color: #ffffff;
  text-decoration: none;
  border: 1px solid #fcaf3b;
  padding: 11px 16px;
  border-radius: 5px;
  font-size: .9rem;
  white-space: nowrap;
  font-weight: 600;
}

#agc-weather-app .club-link:hover {
  background: #fcaf3b;
  color: #111827;
}

/* Main dashboard container */
#agc-weather-app .agc-w-main {
  max-width: 1600px;
  padding: 28px 4% 0;
  margin: auto;
}

#agc-weather-app .brief {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

#agc-weather-app .brief .eyebrow {
  color: #855016;
}

#agc-weather-app .brief h2 {
  font-size: 1.5rem;
  margin: 8px 0 20px;
  color: #111827;
}

#agc-weather-app .brief p {
  font-size: .875rem;
  line-height: 1.6;
  margin: 0 0 20px;
  color: #59616d;
}

#agc-weather-app .agc-w-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 24px;
}

#agc-weather-app .agc-w-nav a {
  font-size: .875rem;
  background: #ffffff;
  color: #374151;
  text-decoration: none;
  border: 1px solid #cdd9e2;
  padding: 9px 13px;
  border-radius: 4px;
}

#agc-weather-app .agc-w-nav a:hover {
  border-color: #374151;
}

#agc-weather-app .viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

#agc-weather-app .viewbar > span {
  font-size: .875rem;
  color: #53697c;
}

#agc-weather-app .segmented {
  display: flex;
}

#agc-weather-app .segmented button {
  border-radius: 0;
  font-size: .875rem;
}

#agc-weather-app .segmented button:first-child {
  border-radius: 5px 0 0 5px;
}

#agc-weather-app .segmented button:last-child {
  border-radius: 0 5px 5px 0;
}

#agc-weather-app .segmented button[aria-pressed=true] {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

#agc-weather-app .days {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  position: sticky;
  top: var(--agc-nav-h, 76px);
  z-index: 20;
  background: #f1f5f9;
  padding: 12px 0;
  border-bottom: 1px solid #c4d1dd;
}

body.admin-bar #agc-weather-app .days {
  top: calc(var(--agc-nav-h, 76px) + 32px);
}

#agc-weather-app .days > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-left: 4px solid #fcaf3b;
  padding: 3px 14px;
}

#agc-weather-app .days span {
  font-size: .875rem;
  letter-spacing: .1em;
  font-weight: 700;
}

#agc-weather-app .days strong {
  font-size: 1rem;
}

#agc-weather-app section {
  scroll-margin-top: 145px;
  margin: 28px 0 36px;
}

#agc-weather-app section h2 {
  font-size: 1.2rem;
  margin: 0 0 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: #111827;
}

#agc-weather-app section h2 .number {
  color: #6f8497;
  font-size: .875rem;
  font-weight: 400;
}

#agc-weather-app section > p {
  font-size: .875rem;
  color: #59616d;
  margin: 0 0 14px;
  line-height: 1.5;
}

#agc-weather-app .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

#agc-weather-app .card {
  background: #ffffff;
  border: 1px solid #cdd8e1;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.04);
}

#agc-weather-app .cardbar {
  padding: 12px 16px;
  background: #f7f9fb;
  border-bottom: 1px solid #e0e7ed;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: .875rem;
}

#agc-weather-app .cardbar a {
  color: #855016;
}

#agc-weather-app .imagebutton {
  display: block;
  border: 0;
  border-radius: 0;
  padding: 0;
  width: 100%;
  background: #ffffff;
}

#agc-weather-app .imagebutton img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  aspect-ratio: auto;
}

#agc-weather-app .status {
  padding: 20px;
  font-size: .875rem;
  color: #59616d;
}

#agc-weather-app .status.hidden {
  display: none;
}

#agc-weather-app .card.failed .imagebutton {
  display: none;
}

#agc-weather-app .card.failed .status {
  min-height: 200px;
  display: grid;
  place-content: center;
  line-height: 1.6;
}

#agc-weather-app .loaded .status {
  display: none;
}

#agc-weather-app aside {
  background: #fff1d9;
  border-left: 4px solid #fcaf3b;
  padding: 20px 24px;
}

#agc-weather-app aside p {
  margin: 8px 0 0;
  line-height: 1.6;
  font-size: .875rem;
}

#agc-weather-app .agc-w-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0 8px;
  color: #59616d;
  font-size: .875rem;
}

#agc-weather-app .agc-w-footer a {
  color: #855016;
}

/* SEO Intro & Outro Sections */
#agc-weather-app .agc-seo-intro {
  background: #ffffff;
  border: 1px solid #cdd8e1;
  border-left: 4px solid #fcaf3b;
  border-radius: 7px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: .9rem;
  line-height: 1.55;
  color: #334155;
}

#agc-weather-app .agc-seo-intro strong {
  color: #111827;
}

#agc-weather-app .agc-seo-outro {
  background: #ffffff;
  border: 1px solid #cdd8e1;
  border-top: 3px solid #fcaf3b;
  border-radius: 7px;
  padding: 24px 26px;
  margin: 32px 0 8px;
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.04);
}

#agc-weather-app .agc-seo-outro h2 {
  font-size: 1.3rem;
  margin: 0 0 12px;
  color: #111827;
}

#agc-weather-app .agc-seo-outro h3 {
  font-size: 1.05rem;
  margin: 20px 0 8px;
  color: #111827;
}

#agc-weather-app .agc-seo-outro p,
#agc-weather-app .agc-seo-outro li {
  font-size: .92rem;
  line-height: 1.6;
  color: #334155;
}

#agc-weather-app .agc-seo-outro ul {
  margin: 10px 0 16px;
  padding-left: 20px;
}

#agc-weather-app .agc-seo-outro li {
  margin-bottom: 6px;
}

#agc-weather-app .agc-seo-cta {
  background: #f8fafc;
  border: 1px solid #cdd8e1;
  border-left: 4px solid #071324;
  border-radius: 6px;
  padding: 16px 20px;
  margin-top: 18px;
}

#agc-weather-app .agc-seo-cta h3 {
  margin-top: 0;
}

#agc-weather-app .agc-seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

#agc-weather-app .agc-seo-links a {
  display: inline-block;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 5px;
  border: 1px solid #071324;
  color: #071324;
  background: #ffffff;
}

#agc-weather-app .agc-seo-links a.agc-seo-primary {
  background: #071324;
  color: #ffffff;
}

#agc-weather-app .agc-seo-links a:hover {
  background: #fcaf3b;
  border-color: #fcaf3b;
  color: #111827;
}

#agc-weather-app dialog#viewer {
  width: min(1100px, 95vw);
  padding: 20px;
  border: 0;
  border-radius: 8px;
  color: #111827;
  background: #ffffff;
}

#agc-weather-app dialog#viewer::backdrop {
  background: rgba(11, 25, 37, 0.73);
}

#agc-weather-app .dialogbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

#agc-weather-app .dialogbar h2 {
  font-size: 1.2rem;
  margin: 0;
}

#agc-weather-app dialog#viewer img {
  display: block;
  width: 100%;
  height: auto;
}

#agc-weather-app dialog#viewer a {
  color: #855016;
  font-size: .875rem;
  display: inline-block;
  margin-top: 10px;
}

body[data-view=sat] #agc-weather-app .sun,
body[data-view=sun] #agc-weather-app .sat {
  display: none;
}

body[data-view=sat] #agc-weather-app .pair,
body[data-view=sun] #agc-weather-app .pair,
body[data-view=sat] #agc-weather-app .days,
body[data-view=sun] #agc-weather-app .days {
  grid-template-columns: 1fr;
}

#agc-weather-app .mobileday {
  display: none;
}

#agc-weather-app .windchart {
  position: relative;
}

#agc-weather-app .windchart img {
  aspect-ratio: auto;
}

#agc-weather-app .runway {
  display: none;
}

#agc-weather-app .windchart .runway {
  display: block;
  position: absolute;
  left: 8.45%;
  width: 88.73%;
  border-top: 2px dashed #a55d14;
  pointer-events: none;
  text-align: right;
}

#agc-weather-app .windchart .r05 {
  top: 70.28%;
}

#agc-weather-app .windchart .r23 {
  top: 36.78%;
  border-color: #285ca2;
}

#agc-weather-app .runway span {
  position: absolute;
  right: 1%;
  bottom: 3px;
  color: #8a4400;
  font-size: clamp(10px, 1vw, 13px);
  background: #ffffffed;
  padding: 1px 4px;
  font-weight: 700;
}

#agc-weather-app .r23 span {
  color: #285ca2;
}

#agc-weather-app #largeframe {
  position: relative;
}

#agc-weather-app #largeframe.windchart img {
  aspect-ratio: auto;
}

#agc-weather-app .meteogram img {
  aspect-ratio: auto;
}

#agc-weather-app .meteogram .cardbar {
  background: #fff5e6;
}

#agc-weather-app #area-weather {
  background: #ffffff;
  border: 1px solid #cdd8e1;
  border-radius: 7px;
  padding: 22px;
}

#agc-weather-app #area-content p {
  line-height: 1.6;
  margin: 8px 0;
}

#agc-weather-app .source {
  font-size: .875rem;
  color: #59616d;
  line-height: 1.5;
  margin-top: 12px;
}

#agc-weather-app .source a {
  color: #855016;
}

#agc-weather-app #synoptic .synopticimage img {
  aspect-ratio: auto;
}

#agc-weather-app .weatherissue {
  font-size: .875rem;
  color: #59616d;
}

#agc-weather-app .synopticempty {
  padding: 24px;
  line-height: 1.6;
  min-height: 170px;
}

#agc-weather-app .areaperiod {
  font-weight: 700;
  margin-top: 16px !important;
}

#agc-weather-app #met-office-overview {
  margin: 12px 0 30px;
}

#agc-weather-app #met-office-overview .group-heading {
  font-size: 1.4rem;
  margin: 0 0 20px;
}

#agc-weather-app .group-heading {
  font-size: 1.4rem;
  margin: 28px 0 20px;
  color: #111827;
}

#agc-weather-app .forecast-separator {
  border: 0;
  border-top: 3px solid #fcaf3b;
  margin: 36px 0 28px;
}

#agc-weather-app #met-office-overview #area-weather {
  margin: 0 0 24px;
}

#agc-weather-app #met-office-overview #synoptic {
  margin: 24px 0 0;
}

#agc-weather-app #notams {
  border-top: 3px solid #fcaf3b;
  padding-top: 22px;
}

#agc-weather-app .notam-intro {
  background: #fff5e6;
  border-left: 4px solid #fcaf3b;
  padding: 16px 20px;
  line-height: 1.6;
}

#agc-weather-app .notam-intro p {
  margin: 8px 0;
}

#agc-weather-app .notam-toolbar,
#agc-weather-app .notam-actions,
#agc-weather-app .notam-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#agc-weather-app .notam-toolbar {
  margin: 20px 0;
}

#agc-weather-app .notam-toolbar a,
#agc-weather-app .notam-card a,
#agc-weather-app .notam-intro a {
  color: #855016;
}

#agc-weather-app #notam-status,
#agc-weather-app #notam-map-note {
  font-size: .875rem;
  line-height: 1.6;
}

#agc-weather-app #notam-map {
  height: 470px;
  isolation: isolate;
  border: 1px solid #cdd8e1;
  border-radius: 8px;
  background: #e5e7eb;
  z-index: 0;
}

#agc-weather-app .notam-card {
  background: #ffffff;
  border: 1px solid #cdd8e1;
  border-radius: 7px;
  padding: 20px;
  margin: 16px 0;
  scroll-margin-top: 130px;
}

#agc-weather-app .notam-card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: #111827;
}

#agc-weather-app .notam-card p {
  font-size: .9rem;
  line-height: 1.6;
  margin: 10px 0;
}

#agc-weather-app .notam-card pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.6 ui-monospace, monospace;
  background: #f1f5f9;
  padding: 14px;
}

#agc-weather-app .notam-card summary,
#agc-weather-app #notam-other > summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0;
}

#agc-weather-app .notam-critical {
  border-left: 5px solid #b42318;
}

#agc-weather-app .notam-alert {
  color: #9f2519;
  font-weight: 700;
}

#agc-weather-app .notam-tag {
  background: #fff1d9;
  color: #66400f;
  border-radius: 4px;
  padding: 5px 9px;
  font-size: .8rem;
}

#agc-weather-app .notam-actions {
  margin-top: 12px;
  font-size: .875rem;
}

#agc-weather-app .notam-actions button {
  font-size: .85rem;
  padding: 7px 10px;
}

#agc-weather-app .notam-empty {
  background: #ffffff;
  padding: 20px;
}

#agc-weather-app #notam-other {
  background: #e9edf2;
  padding: 14px 20px;
  border-radius: 7px;
}

#agc-weather-app .leaflet-popup-content {
  max-height: 230px;
  overflow: auto;
}

#agc-weather-app .leaflet-popup-content button {
  font-size: 13px;
  padding: 8px;
}

#agc-weather-app .leaflet-container a {
  color: #855016;
}

@media (max-width: 700px) {
  #agc-weather-app .agc-w-header {
    padding: 20px;
    flex-wrap: wrap;
  }
  #agc-weather-app.agc-has-fixed-nav .agc-w-header {
    padding-top: 96px;
  }
  #agc-weather-app .brand {
    gap: 14px;
  }
  #agc-weather-app .brand img {
    width: 64px;
    height: 70px;
  }
  #agc-weather-app .eyebrow {
    font-size: .75rem;
    letter-spacing: .08em;
  }
  #agc-weather-app .agc-w-header h1 {
    font-size: 1.45rem;
  }
  #agc-weather-app .agc-w-header button,
  #agc-weather-app .club-link {
    padding: 9px 12px;
    font-size: .875rem;
  }
  #agc-weather-app .headeractions {
    flex-wrap: wrap;
  }
  #agc-weather-app .agc-w-main {
    padding: 22px 16px 0;
  }
  #agc-weather-app .brief {
    display: block;
  }
  #agc-weather-app .brief h2 {
    margin-bottom: 12px;
  }
  #agc-weather-app .brief p {
    font-size: .875rem;
  }
  #agc-weather-app .days {
    display: none;
  }
  #agc-weather-app .pair {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #agc-weather-app .mobileday {
    display: inline;
  }
  #agc-weather-app .viewbar {
    align-items: flex-start;
    flex-direction: column;
  }
  #agc-weather-app .segmented button {
    padding: 10px 13px;
  }
  #agc-weather-app section {
    scroll-margin-top: 90px;
  }
  #agc-weather-app .agc-w-footer {
    flex-direction: column;
    gap: 10px;
  }
  #agc-weather-app .agc-w-nav {
    gap: 6px;
  }
  #agc-weather-app .agc-w-nav a {
    padding: 8px 10px;
  }
  #agc-weather-app #notam-map {
    height: 350px;
  }
  #agc-weather-app .notam-toolbar strong {
    width: 100%;
  }
  #agc-weather-app .notam-card {
    padding: 16px;
  }
}

@media print {
  #agc-weather-app .agc-w-header button,
  #agc-weather-app .headeractions,
  #agc-weather-app .agc-w-nav,
  #agc-weather-app .viewbar,
  #agc-weather-app #notam-map,
  #agc-weather-app .notam-toolbar {
    display: none;
  }
  #agc-weather-app .agc-w-header {
    background: #ffffff;
    color: #111827;
    padding-top: 10px;
  }
  #agc-weather-app .days {
    position: static;
  }
  #agc-weather-app section,
  #agc-weather-app .notam-card {
    break-inside: avoid;
    margin: 18px 0;
  }
  #agc-weather-app .pair {
    grid-template-columns: 1fr 1fr;
  }
  #agc-weather-app .agc-w-main {
    padding: 10px;
  }
  #agc-weather-app .cardbar a {
    display: none;
  }
  #agc-weather-app .forecast-separator {
    margin: 20px 0;
  }
  #agc-weather-app .agc-w-footer {
    margin-top: 10px;
  }
}
