/*!
 * NEE Data Widgets — Site Outage History (spec §19)
 * Namespaced under .nee-outage so nothing here can collide with the theme
 * or with the plugin's other widgets. Colour tokens and dark-mode handling
 * are ported unchanged from the reviewed mockup (S19_SITE_OUTAGE_MOCKUP.html).
 */

.nee-outage{
  --nee-oh-bg:#f5f7f9; --nee-oh-panel:#fcfcfb; --nee-oh-panel2:#eef2f6; --nee-oh-panel3:#e4eaf0;
  --nee-oh-ink:#141a21; --nee-oh-ink2:#3d4854; --nee-oh-muted:#63707f; --nee-oh-rule:#dbe2e9;
  --nee-oh-accent:#1f5f8b; --nee-oh-accent-soft:#e4eef5;
  --nee-oh-ref:#2a78d6; --nee-oh-forc:#eb6834; --nee-oh-unk:#7c8a99;
  --nee-oh-good:#1f6b45; --nee-oh-warn:#9a4a1e; --nee-oh-oxide:#9a4a1e; --nee-oh-oxide-soft:#f6e9e1;
  --nee-oh-serif:"IBM Plex Serif",Georgia,serif;
  --nee-oh-sans:"IBM Plex Sans",system-ui,-apple-system,sans-serif;
  --nee-oh-mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}
@media (prefers-color-scheme:dark){
  .nee-outage:not([data-theme="light"]){
    --nee-oh-bg:#10141a; --nee-oh-panel:#1a1a19; --nee-oh-panel2:#1e252e; --nee-oh-panel3:#28313b;
    --nee-oh-ink:#e7ecf1; --nee-oh-ink2:#c2cbd5; --nee-oh-muted:#8d9aa8; --nee-oh-rule:#2a333e;
    --nee-oh-accent:#79b0d6; --nee-oh-accent-soft:#1b2b38;
    --nee-oh-ref:#3987e5; --nee-oh-forc:#d95926; --nee-oh-unk:#8d9aa8;
    --nee-oh-good:#68c295; --nee-oh-warn:#dd9366; --nee-oh-oxide:#dd9366; --nee-oh-oxide-soft:#332017;
  }
}
.nee-outage[data-theme="dark"]{
  --nee-oh-bg:#10141a; --nee-oh-panel:#1a1a19; --nee-oh-panel2:#1e252e; --nee-oh-panel3:#28313b;
  --nee-oh-ink:#e7ecf1; --nee-oh-ink2:#c2cbd5; --nee-oh-muted:#8d9aa8; --nee-oh-rule:#2a333e;
  --nee-oh-accent:#79b0d6; --nee-oh-accent-soft:#1b2b38;
  --nee-oh-ref:#3987e5; --nee-oh-forc:#d95926; --nee-oh-unk:#8d9aa8;
  --nee-oh-good:#68c295; --nee-oh-warn:#dd9366; --nee-oh-oxide:#dd9366; --nee-oh-oxide-soft:#332017;
}

.nee-outage{box-sizing:border-box;background:var(--nee-oh-panel);color:var(--nee-oh-ink);
  font-family:var(--nee-oh-sans);font-size:15px;line-height:1.6;
  border:1px solid var(--nee-oh-rule);border-radius:7px;margin:0 0 16px;position:relative}
.nee-outage *{box-sizing:border-box}
.nee-outage .nee-oh-wb{padding:15px 16px}

/* site header / unit header tiles */
.nee-outage .nee-oh-sitehead{display:flex;flex-wrap:wrap;gap:14px 28px;align-items:flex-start}
.nee-outage .nee-oh-sitename{font-family:var(--nee-oh-serif);font-size:26px;font-weight:600;line-height:1.1;margin:0}
.nee-outage .nee-oh-sitemeta{font-family:var(--nee-oh-mono);font-size:11.5px;color:var(--nee-oh-muted);margin-top:5px}
.nee-outage .nee-oh-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(122px,1fr));gap:1px;
  background:var(--nee-oh-rule);border:1px solid var(--nee-oh-rule);border-radius:6px;overflow:hidden;margin-top:4px}
.nee-outage .nee-oh-tile{background:var(--nee-oh-panel);padding:10px 13px}
.nee-outage .nee-oh-tile .k{font-family:var(--nee-oh-mono);font-size:9.6px;letter-spacing:.09em;
  text-transform:uppercase;color:var(--nee-oh-muted)}
.nee-outage .nee-oh-tile .v{font-family:var(--nee-oh-serif);font-size:23px;font-weight:600;line-height:1.15;
  font-variant-numeric:tabular-nums;margin-top:1px}
.nee-outage .nee-oh-tile .n{font-size:11.5px;color:var(--nee-oh-muted);line-height:1.35}

/* unit tabs (site widget's sister-unit list) */
.nee-outage .nee-oh-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.nee-outage .nee-oh-tab{font-family:var(--nee-oh-mono);font-size:12px;padding:6px 12px;
  border:1px solid var(--nee-oh-rule);border-radius:5px;background:var(--nee-oh-panel);
  color:var(--nee-oh-ink2);line-height:1.3;text-align:left}
.nee-outage .nee-oh-tab b{display:block;font-family:var(--nee-oh-sans);font-size:13px;font-weight:600;color:var(--nee-oh-ink)}
.nee-outage .nee-oh-tab[aria-current="true"]{border-color:var(--nee-oh-accent);background:var(--nee-oh-accent-soft);color:var(--nee-oh-accent)}
.nee-outage .nee-oh-tab[aria-current="true"] b{color:var(--nee-oh-accent)}
.nee-outage a.nee-oh-tab{display:inline-block;text-decoration:none;cursor:pointer;color:var(--nee-oh-ink2)}
.nee-outage a.nee-oh-tab:hover{border-color:var(--nee-oh-accent)}
.nee-outage a.nee-oh-tab:hover b{color:var(--nee-oh-accent)}

/* legend */
.nee-outage .nee-oh-legend{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:12.2px;color:var(--nee-oh-ink2);margin:0 0 10px}
.nee-outage .nee-oh-legend span{display:inline-flex;align-items:center;gap:6px}
.nee-outage .nee-oh-sw{width:13px;height:13px;border-radius:3px;display:inline-block;flex:none}

.nee-outage .nee-oh-plot{width:100%;overflow-x:auto}
.nee-outage .nee-oh-plot.nee-oh-plot-wide>svg{min-width:660px}
.nee-outage .nee-oh-plot.nee-oh-plot-hist>svg{min-width:560px}
/* 1.11.0 (O-47): cadence scales to fit -- its newest point is at the right edge */
.nee-outage .nee-oh-plot.nee-oh-plot-fit{overflow-x:visible}
.nee-outage .nee-oh-plot.nee-oh-plot-fit>svg{min-width:0;width:100%}
@media (max-width:620px){
  .nee-outage .nee-oh-plot.nee-oh-plot-wide>svg,
  .nee-outage .nee-oh-plot.nee-oh-plot-hist>svg{min-width:0}
}
.nee-outage svg{display:block;max-width:100%;height:auto}
.nee-outage .nee-oh-axis{font-family:var(--nee-oh-mono);font-size:10px;fill:var(--nee-oh-muted)}
.nee-outage .nee-oh-rowlab{font-family:var(--nee-oh-mono);font-size:11px;fill:var(--nee-oh-ink2)}
.nee-outage .nee-oh-rowdk{font-family:var(--nee-oh-mono);font-size:9.5px;fill:var(--nee-oh-muted)}
.nee-outage .nee-oh-grid{stroke:var(--nee-oh-rule);stroke-width:1}
.nee-outage .nee-oh-seg{cursor:pointer}
.nee-outage .nee-oh-seg:hover{stroke:var(--nee-oh-ink);stroke-width:1.2}

/* shared tooltip (one instance, appended to <body> by the JS) */
.nee-oh-tt{position:fixed;pointer-events:none;z-index:9999;background:var(--nee-oh-panel,#fcfcfb);
  border:1px solid var(--nee-oh-rule,#dbe2e9);border-radius:6px;padding:8px 11px;font-size:12.4px;
  line-height:1.45;box-shadow:0 3px 14px rgba(0,0,0,.14);max-width:260px;
  font-family:var(--nee-oh-sans,sans-serif);color:var(--nee-oh-ink,#141a21)}
.nee-oh-tt b{font-family:var(--nee-oh-sans,sans-serif)}
.nee-oh-tt .m{font-family:var(--nee-oh-mono,monospace);font-size:11px;color:var(--nee-oh-muted,#63707f)}
.nee-oh-tt[hidden]{display:none}

.nee-outage .nee-oh-scroll{overflow-x:auto;margin:10px 0 0}
.nee-outage table{border-collapse:collapse;width:100%;font-size:12.8px;font-variant-numeric:tabular-nums}
.nee-outage th{text-align:left;font-family:var(--nee-oh-mono);font-size:10px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--nee-oh-muted);font-weight:500;border-bottom:1.5px solid var(--nee-oh-rule);
  padding:6px 11px 6px 0;white-space:nowrap}
.nee-outage td{padding:6px 11px 6px 0;border-bottom:1px solid var(--nee-oh-rule);vertical-align:top}
.nee-outage tbody tr:last-child td{border-bottom:none}
.nee-outage td.m,.nee-outage th.m{font-family:var(--nee-oh-mono);font-size:11.8px;white-space:nowrap}
.nee-outage .nee-oh-pill{font-family:var(--nee-oh-mono);font-size:10px;padding:1.5px 6px;border-radius:3px;
  white-space:nowrap;display:inline-flex;align-items:center;gap:4px}
.nee-outage .nee-oh-pill i{width:7px;height:7px;border-radius:2px;display:inline-block;font-style:normal}
.nee-outage .nee-oh-pill.ref{background:var(--nee-oh-accent-soft);color:var(--nee-oh-ref)}
.nee-outage .nee-oh-pill.forc{background:var(--nee-oh-oxide-soft);color:var(--nee-oh-forc)}
.nee-outage .nee-oh-pill.unk{background:var(--nee-oh-panel2);color:var(--nee-oh-muted)}
.nee-outage .nee-oh-pill.off{background:var(--nee-oh-oxide-soft);color:var(--nee-oh-forc)}
.nee-outage .nee-oh-pill.cens{background:transparent;color:var(--nee-oh-oxide);border:1px dashed var(--nee-oh-oxide)}
.nee-outage .nee-oh-pill.ret{background:var(--nee-oh-panel2);color:var(--nee-oh-muted);border:1px solid var(--nee-oh-rule)}
.nee-outage .nee-oh-note{font-size:12px;color:var(--nee-oh-muted);margin:9px 0 0;max-width:80ch}
.nee-outage .nee-oh-how{border-bottom:1px dotted var(--nee-oh-muted);cursor:help}
.nee-outage .nee-oh-ev{display:flex;flex-wrap:wrap;gap:5px 8px;align-items:baseline;min-width:230px}
.nee-outage .nee-oh-ev .txt{font-size:12.2px;color:var(--nee-oh-ink2)}
.nee-outage .nee-oh-ev .none{cursor:help;border-bottom:1px dotted var(--nee-oh-muted);
  font-size:12.2px;color:var(--nee-oh-muted);font-style:italic}
.nee-outage .nee-oh-chip{font-family:var(--nee-oh-mono);font-size:10.5px;padding:1px 6px;border-radius:3px;
  border:1px solid var(--nee-oh-rule);background:var(--nee-oh-panel2);color:var(--nee-oh-ink2);
  text-decoration:none;white-space:nowrap;display:inline-block}
.nee-outage a.nee-oh-chip:hover{color:var(--nee-oh-accent);border-color:var(--nee-oh-accent)}
.nee-outage .nee-oh-chip.soft{background:transparent;color:var(--nee-oh-muted);border-style:dashed}
.nee-outage .nee-oh-splitb{font-family:var(--nee-oh-mono);font-size:10px;color:var(--nee-oh-accent);
  background:var(--nee-oh-accent-soft);padding:1px 5px;border-radius:3px;white-space:nowrap;cursor:help}
.nee-outage .nee-oh-splitb.est{color:var(--nee-oh-oxide);background:var(--nee-oh-oxide-soft)}
.nee-outage .nee-oh-chip:focus-visible,
.nee-outage .nee-oh-tab:focus-visible{outline:2px solid var(--nee-oh-accent);outline-offset:1px}
.nee-outage .nee-oh-flagbox{border:1px solid var(--nee-oh-rule);border-left:3px solid var(--nee-oh-warn);
  background:var(--nee-oh-panel);border-radius:0 5px 5px 0;padding:11px 15px;margin:10px 0;font-size:13px}
.nee-outage .nee-oh-flagbox b{font-family:var(--nee-oh-serif);color:var(--nee-oh-warn)}
.nee-outage .nee-oh-nextbox{border:1px solid var(--nee-oh-rule);border-radius:6px;padding:11px 14px;
  margin-top:12px;background:var(--nee-oh-panel2);font-size:13px}

@media (max-width:560px){
  .nee-outage .nee-oh-wb{padding:12px}
}

/* landing index (§20 State A) and not-found state (§20 State B) */
.nee-outage-history-not-found{font-size:14px;color:var(--nee-oh-ink2,#3d4854)}
.nee-outage-index-provenance{font-size:13.5px;line-height:1.6;color:var(--nee-oh-ink2);max-width:80ch;margin:0 0 16px}
.nee-outage-index-heading{font-family:var(--nee-oh-serif);font-size:20px;font-weight:600;margin:0 0 10px}
.nee-outage-index-search{width:100%;max-width:360px;font-size:14px;padding:7px 11px;margin:0 0 18px;
  border:1px solid var(--nee-oh-rule);border-radius:5px;background:var(--nee-oh-panel);color:var(--nee-oh-ink)}
.nee-outage-index-site{margin:0 0 18px}
.nee-outage-index-site h3{font-family:var(--nee-oh-sans);font-size:13px;font-weight:600;letter-spacing:.02em;
  color:var(--nee-oh-muted);text-transform:uppercase;margin:0 0 6px;padding-bottom:5px;border-bottom:1px solid var(--nee-oh-rule)}
.nee-outage-index-site ul{list-style:none;margin:0;padding:0}
.nee-outage-index-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;
  padding:6px 0;border-bottom:1px solid var(--nee-oh-rule);font-size:13.5px}
.nee-outage-index-site ul li:last-child{border-bottom:none}
.nee-outage-index-unit{font-weight:600;color:var(--nee-oh-accent);text-decoration:none}
.nee-outage-index-unit:hover{text-decoration:underline}
.nee-outage-index-docket{color:var(--nee-oh-muted)}
.nee-outage-index-state,.nee-outage-index-type{font-size:12px;color:var(--nee-oh-ink2)}
.nee-outage-index-runs{font-size:12px;color:var(--nee-oh-muted);margin-left:auto}
