/* Customer-facing status map, styled 1:1 with clearnetworx.com (Divi): the
   35px utility bar, the 70px white header with the uppercase Gilroy nav, and
   Divi's 80% / 1080px content rows. Separate from the app's Tailwind build. */

@font-face {
  font-family: "Gilroy-ExtraBold";
  font-display: swap;
  src: url("/assets/Gilroy-ExtraBold-a5f3f006.otf") format("opentype");
}
@font-face {
  font-family: "Gilroy-Light";
  font-display: swap;
  src: url("/assets/Gilroy-Light-5dd03a8d.otf") format("opentype");
}

:root {
  --cnx-ink: #444749;
  --cnx-link: #1497d4;
  --cnx-accent: #2ea3f2;
  --cnx-bar: #444749;
  --cnx-section: #f4f4f4;
  --cnx-red: #e5322d;
  --cnx-orange: #ff8c1a;
  --cnx-yellow: #f5c518;
  --cnx-gray: #8a939b;
  --cnx-green: #2ea043;
  --cnx-heading: "Gilroy-ExtraBold", Helvetica, Arial, Lucida, sans-serif;
  --cnx-body: "Gilroy-Light", Helvetica, Arial, Lucida, sans-serif;
  --cnx-bars: 105px; /* utility bar + header, both fixed */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.cnx {
  font-family: var(--cnx-body);
  font-size: 18px;
  font-weight: 500;
  line-height: 27px;
  color: var(--cnx-ink);
  background: #fff;
  padding-top: var(--cnx-bars);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cnx-link); text-decoration: none; }
h1, h2, h3 { font-family: var(--cnx-heading); font-weight: 500; color: var(--cnx-ink); margin: 0; padding-bottom: 10px; letter-spacing: 2px; }
button, input { font: inherit; }

/* Divi: header container is full width with 30px gutters; content rows are 80% up to 1080px. */
.cnx-container { width: 100%; padding: 0 30px; margin: 0 auto; }
.cnx-row { width: 80%; max-width: 1080px; margin: 0 auto; }

/* ── Utility bar (#top-header) ────────────────────────────────────────── */
.cnx-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 35px;
  background: var(--cnx-bar);
  color: #fff;
  font-family: var(--cnx-heading);
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 1px;
}
.cnx-topbar .cnx-container { display: flex; align-items: flex-start; justify-content: space-between; padding-top: 10.5px; }
.cnx-topbar a { color: #fff; }
.cnx-topbar-info { display: flex; gap: 18px; }
.cnx-topbar-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; text-transform: uppercase; }

/* ── Main header (#main-header) ───────────────────────────────────────── */
.cnx-header {
  position: fixed; top: 35px; left: 0; right: 0; z-index: 99;
  height: 70px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
}
.cnx-header .cnx-container { display: flex; align-items: center; justify-content: space-between; height: 70px; padding-right: 32px; }
.cnx-logo { display: flex; align-items: center; flex-shrink: 0; padding-left: 4px; }
.cnx-logo img { height: 49px; width: auto; display: block; }

.cnx-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.cnx-nav > ul > li { position: relative; padding: 0 10px; }
.cnx-nav > ul > li > a {
  display: block;
  font-family: var(--cnx-heading);
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cnx-ink);
  padding: 28px 0 28px;
  transition: opacity .4s ease-in-out;
}
.cnx-nav > ul > li > a:hover { opacity: .7; }
.cnx-nav > ul > li.cnx-current > a { color: var(--cnx-link); }
.cnx-has-sub > a { padding-right: 20px !important; }
.cnx-has-sub > a::after {
  content: "";
  position: absolute; right: 12px; top: 30px;
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.cnx-nav ul ul {
  list-style: none;
  margin: 0; padding: 30px 20px;
  position: absolute; top: 70px; left: 0;
  min-width: 240px;
  background: #fff;
  border-top: 3px solid var(--cnx-accent);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  visibility: hidden; opacity: 0;
  transition: opacity .2s ease-in-out;
  z-index: 10;
}
.cnx-has-sub:hover > ul, .cnx-has-sub:focus-within > ul { visibility: visible; opacity: 1; }
.cnx-nav ul ul a {
  display: block;
  padding: 0 40px 10px 20px;
  font-family: var(--cnx-heading);
  font-weight: 700;
  font-size: 14px;
  line-height: 28px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cnx-ink);
  white-space: nowrap;
}
.cnx-nav ul ul a:hover { opacity: .7; }

/* The "Get Started" pill — their PNG gradient, 50px radius. */
.cnx-nav > ul > li.cnx-getstarted > a {
  padding: 15px 30px;
  line-height: 9px;
  color: #fff;
  border-radius: 50px;
  background: url("/assets/clearnetworx-getstarted-bg-661005ab.png") center / cover no-repeat;
}

.cnx-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.cnx-nav-burger { display: none; flex-direction: column; gap: 6px; padding: 4px 0; cursor: pointer; }
.cnx-nav-burger span { display: block; width: 28px; height: 3px; background: var(--cnx-link); border-radius: 1px; }

@media (max-width: 980px) {
  :root { --cnx-bars: 111px; }
  .cnx-topbar .cnx-container { justify-content: center; }
  .cnx-topbar-menu { display: none; }
  .cnx-header { height: 76px; }
  .cnx-header .cnx-container { height: 76px; width: 80%; padding: 0; }
  .cnx-logo { padding-left: 4px; }
  .cnx-logo img { height: 40px; }
  .cnx-nav-burger { display: flex; }
  .cnx-nav {
    display: none;
    position: absolute; top: 76px; left: 0; width: 100%;
    padding: 5%;
    background: #fff;
    border-top: 3px solid var(--cnx-accent);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  }
  .cnx-nav-toggle:checked ~ .cnx-nav { display: block; }
  .cnx-nav > ul { flex-direction: column; align-items: stretch; padding: 15px 0; }
  .cnx-nav > ul > li { padding: 0; }
  .cnx-nav > ul > li > a, .cnx-nav ul ul a {
    padding: 10px 5%;
    font-weight: normal;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: normal;
    text-transform: none;
    color: var(--cnx-ink);
    border-bottom: 1px solid rgba(0, 0, 0, .03);
    white-space: normal;
  }
  .cnx-nav > ul > li.cnx-current > a { background: #f7f7f7; color: var(--cnx-ink); }
  .cnx-nav > ul > li.cnx-getstarted > a { background: none; color: var(--cnx-ink); border-radius: 0; }
  .cnx-has-sub > a::after { display: none; }
  .sz-zip { width: 100%; flex-direction: column; }
  .sz-zip input { width: 100%; }
  body.cnx .sz-status { margin-left: 0; text-align: left; }
  .cnx-nav ul ul {
    position: static; visibility: visible; opacity: 1;
    padding: 0 0 0 5%; border-top: 0; box-shadow: none; min-width: 0;
  }
}

/* ── Page (Divi sections and rows) ───────────────────────────────────── */
.cnx-hero { background: var(--cnx-bar); color: #fff; padding: 54px 0; }
.cnx-hero h1 { color: #fff; font-size: 50px; line-height: 65px; text-transform: uppercase; }
.cnx-hero .cnx-eyebrow { font-family: var(--cnx-heading); font-size: 22px; letter-spacing: 2px; text-transform: uppercase; padding-bottom: 10px; }

.cnx-section { padding: 54px 0; }
.cnx-section.alt { background: var(--cnx-section); }

.cnx-footer { background: var(--cnx-bar); color: #fff; font-size: 14px; line-height: 20px; padding: 18px 0; }
.cnx-footer .cnx-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }

.sz-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 30px; margin-bottom: 27px; }
.sz-zip { display: flex; gap: 10px; }
.sz-zip input {
  width: 220px; padding: 12px 16px;
  border: 0; border-radius: 3px;
  background: var(--cnx-section);
  font-size: 16px; color: var(--cnx-ink);
}
.sz-zip input:focus { outline: 2px solid var(--cnx-link); }
.sz-zip button {
  padding: 12px 25px;
  border: 2px solid var(--cnx-link); border-radius: 50px;
  background: transparent; color: var(--cnx-link);
  font-family: var(--cnx-heading); font-size: 14px; line-height: 20px; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease-in-out, color .2s ease-in-out;
}
.sz-zip button:hover { background: var(--cnx-link); color: #fff; }

.sz-status { margin-left: auto; text-align: right; font-size: 16px; line-height: 24px; }
.sz-status strong { display: block; font-family: var(--cnx-heading); font-weight: normal; font-size: 18px; letter-spacing: 1px; color: var(--cnx-ink); }
.sz-status.ok strong { color: var(--cnx-green); }
.sz-status.bad strong { color: var(--cnx-red); }

.sz-map-wrap { position: relative; }
#status-map {
  width: 100%; height: clamp(420px, 65vh, 680px);
  border-radius: 15px; overflow: hidden;
  background: var(--cnx-section);
  box-shadow: 0 2px 18px rgba(0, 0, 0, .1);
}

/* Outage list: laid over the map's right edge, so the map keeps its full width. */
.sz-panel {
  position: absolute; top: 12px; right: 12px; width: 300px; max-height: calc(100% - 24px); z-index: 800;
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .96);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.sz-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 18px 12px;
  border: 0; background: none; color: var(--cnx-ink); cursor: pointer;
  font-family: var(--cnx-heading); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; text-align: left;
}
.sz-panel-head::after {
  content: ""; width: 8px; height: 8px; margin-left: 12px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); opacity: .6;
}
.sz-panel.collapsed .sz-panel-head::after { transform: rotate(-135deg) translateY(-2px); }
.sz-panel.collapsed .sz-list { display: none; }
.sz-list { list-style: none; margin: 0; padding: 0; min-height: 0; overflow-y: auto; border-top: 1px solid rgba(0, 0, 0, .08); }
.sz-list li + li { border-top: 1px solid rgba(0, 0, 0, .06); }
.sz-list button {
  position: relative; display: block; width: 100%; text-align: left;
  padding: 12px 30px 12px 14px;
  border: 0; border-left: 4px solid transparent; background: none;
  font: inherit; color: var(--cnx-ink); cursor: pointer;
}
.sz-list button::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-top: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg); opacity: .4;
}
.sz-list button:hover, .sz-list button:focus-visible { background: var(--cnx-section); outline: none; }
.sz-list li.red button { border-left-color: var(--cnx-red); }
.sz-list li.orange button { border-left-color: var(--cnx-orange); }
.sz-list li.yellow button { border-left-color: var(--cnx-yellow); }
.sz-list li.gray button { border-left-color: var(--cnx-gray); }
.sz-item-level { font-family: var(--cnx-heading); font-size: 12px; line-height: 18px; letter-spacing: 1px; text-transform: uppercase; }
.sz-list li.red .sz-item-level { color: var(--cnx-red); }
.sz-list li.orange .sz-item-level { color: #d9730d; }
.sz-list li.yellow .sz-item-level { color: #b8930a; }
.sz-list li.gray .sz-item-level { color: #5f6970; }
.sz-panel-area { padding: 0 18px 10px; font-family: var(--cnx-heading); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--cnx-link); }
.sz-panel.collapsed .sz-panel-area { display: none; }
.sz-item-market { font-family: var(--cnx-heading); font-size: 14px; line-height: 20px; letter-spacing: .5px; }
.sz-mine { margin-left: 8px; padding: 1px 8px; border-radius: 50px; background: var(--cnx-link); color: #fff; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; vertical-align: 2px; }
.sz-list li.mine button { background: rgba(20, 151, 212, .06); }
.sz-item-cause { font-size: 16px; line-height: 22px; }
.sz-item-meta { font-size: 13px; line-height: 19px; opacity: .8; }
.sz-nowrap { white-space: nowrap; }
.sz-list .sz-tag { font-size: 11px; padding: 1px 10px; }
.sz-list .sz-empty { padding: 14px 18px; font-size: 15px; line-height: 22px; }

/* ZIP lookup result sits at the top of the panel. */
.sz-zip-result {
  position: relative; padding: 14px 18px 16px;
  border-top: 5px solid var(--cnx-link); border-radius: 12px 12px 0 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.sz-zip-result.red { border-top-color: var(--cnx-red); }
.sz-zip-result.orange { border-top-color: var(--cnx-orange); }
.sz-zip-result.yellow { border-top-color: var(--cnx-yellow); }
.sz-zip-result.gray { border-top-color: var(--cnx-gray); }
.sz-zip-result.green { border-top-color: var(--cnx-green); }
.sz-zip-result h2 { font-size: 18px; line-height: 24px; letter-spacing: 1px; padding: 0 30px 4px 0; }
.sz-zip-result .sz-close {
  position: absolute; top: 6px; right: 6px; width: 36px; height: 36px;
  background: none; border: 0; color: var(--cnx-ink); opacity: .6; cursor: pointer; font-size: 26px; line-height: 1;
}
.sz-zip-result .sz-detail { font-size: 14px; line-height: 21px; }

.sz-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 800;
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(255, 255, 255, .92); box-shadow: 0 1px 6px rgba(0, 0, 0, .12);
  font-size: 12px; line-height: 18px;
}
.sz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.sz-legend i.red { background: var(--cnx-red); }
.sz-legend i.orange { background: var(--cnx-orange); }
.sz-legend i.yellow { background: var(--cnx-yellow); }
.sz-legend i.gray { background: var(--cnx-gray); }

@media (max-width: 980px) {
  .sz-map-wrap { display: flex; flex-direction: column; }
  .sz-panel { position: static; order: -1; width: auto; max-height: none; margin-bottom: 20px; }
  .sz-list { max-height: 360px; }
  .sz-legend { position: static; order: 1; margin-top: 12px; background: none; box-shadow: none; padding: 0; }
}

.sz-note { font-size: 16px; line-height: 24px; margin: 27px 0 0; }

/* Zone details in the click popup. */
.leaflet-popup-content { margin: 14px 18px; }
.sz-detail { font-family: var(--cnx-body); font-size: 15px; line-height: 23px; color: var(--cnx-ink); }
.sz-detail .sz-title { font-family: var(--cnx-heading); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }
.sz-detail .sz-title.red { color: var(--cnx-red); }
.sz-detail .sz-title.orange { color: #d9730d; }
.sz-detail .sz-title.yellow { color: #b8930a; }
.sz-detail .sz-title.gray { color: #5f6970; }
.sz-detail .sz-title.green { color: var(--cnx-green); }
.sz-incident { border-top: 1px solid rgba(0, 0, 0, .08); padding-top: 8px; margin-top: 8px; }
.sz-incident div span { font-family: var(--cnx-heading); }
.sz-tags { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
.sz-tag {
  display: inline-block; padding: 2px 12px; white-space: nowrap;
  border-radius: 50px; font-family: var(--cnx-heading); font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  background: var(--cnx-section); color: var(--cnx-ink);
}
.sz-tag.power { background: #fff3e0; color: #b45309; }
.sz-tag.service { background: #e8f4fb; color: #0f6fa0; }
