/* ==========================================================================
   WokingWeather - modern screen theme for the Saratoga World-ML templates
   File: weather-screen-modern-wide.css
   Selected in Settings.php:  $SITE['CSSscreenDefault'] = 'weather-screen-modern.css';
                              $SITE['CSSwideOrNarrowDefault'] = 'wide';
   CSS only - no template PHP changes are needed (top.php gained a viewport
   meta tag so the layout can adapt on phones).
   ========================================================================== */

:root {
  --ww-bg:          #eef2f7;
  --ww-surface:     #ffffff;
  --ww-surface-alt: #f6f8fb;
  --ww-border:      #dde3ec;
  --ww-text:        #1d2733;
  --ww-muted:       #5d6b7c;
  --ww-primary:     #1f5f99;
  --ww-primary-dk:  #143f68;
  --ww-accent:      #2b8fd6;
  --ww-link:        #1b6fb5;
  --ww-radius:      12px;
  --ww-shadow:      0 1px 2px rgba(16,32,56,.06), 0 4px 16px rgba(16,32,56,.06);
  --ww-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ----- Base ------------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }

body {
  color: var(--ww-text);
  background: var(--ww-bg);
  font-family: var(--ww-font);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}
html > body { font-size: 15px; }

#page {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
  color: var(--ww-text);
  background: transparent;
  border: none;
}

a { color: var(--ww-link); }
img { max-width: 100%; }
img:not([src*="spacer"]) { height: auto; }   /* keep the template's 2px spacer.gif rows flat */

.doNotDisplay { display: none !important; }
.picfl { float: left;  padding-right: 8px; position: relative; }
.picfr { float: right; padding-left: 8px;  position: relative; }
.picfc { text-align: center; padding: 0 8px; position: relative; }

p  { margin: .75em 0 1em 0; padding: 0; }
dt { font-weight: 600; margin: 0; padding: 0 0 .5ex 0; }
dd { margin: 0 0 1.25em 1.5em; padding: 0; }
small { color: var(--ww-muted); }

/* ----- Header ----------------------------------------------------------- */

#header {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, var(--ww-primary-dk) 0%, var(--ww-primary) 55%, var(--ww-accent) 100%);
  border-radius: var(--ww-radius);
  box-shadow: var(--ww-shadow);
  padding: 18px 22px 14px 22px;
  margin-bottom: 18px;
  overflow: hidden;
}
#header::after { content: ""; display: block; clear: both; }

.headerTitle {
  margin: 0;
  padding: 0;
  font-size: 30px;
  line-height: 1.2;
}
.headerTitle a,
.headerTitle > a {
  color: #fff;
  background: transparent;
  text-decoration: none;
  font-size: 100%;
  font-weight: 700;
  font-style: normal;
  letter-spacing: -.01em;
}
.headerTitle span { color: #fff; font-weight: 400; }

.headerTemp,
[class~="headerTemp"] {
  float: right;
  color: #fff;
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  margin: -46px 0 0 16px;   /* sits level with the site title */
  position: relative;
  top: 0;
  right: 0;
}

.subHeader {
  float: left;
  clear: left;
  position: relative;
  color: rgba(255,255,255,.88);
  background: transparent;
  font-size: 15px;
  margin: 4px 0 0 0;
  padding: 0;
}
.subHeader a { color: #fff; text-decoration: none; font-weight: 600; }
.subHeader select {
  margin-top: 8px;
  font: inherit;
  font-size: 13px;
  color: var(--ww-text);
  background: rgba(255,255,255,.92);
  border: 0;
  border-radius: 6px;
  padding: 2px 6px;
}
.subHeader img { vertical-align: middle; }

.subHeaderRight {
  clear: right;
  color: #fff;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  font-size: 14px;
  text-align: right;
  margin: 10px 0 0 auto;
  padding: 6px 12px;
  max-width: 60%;
  float: right;
}
.subHeaderRight a { color: #fff; }


/* live-update flash: keep header text white (the AJAX script flashes values green, unreadable on blue) */
#header .ajax, #header .ajax * { color: #fff !important; }

/* ----- Left side bar / navigation --------------------------------------- */

.leftSideBar {
  float: left;
  clear: left;
  width: 190px;
  box-sizing: border-box;
  background: var(--ww-surface);
  border-radius: var(--ww-radius);
  box-shadow: var(--ww-shadow);
  padding: 10px 0 12px 0;
  margin-bottom: 18px;
}

.leftSideBar .sideBarTitle {
  color: var(--ww-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 8px 0 4px 0;
  padding: 0 16px;
}

.leftSideBar ul { list-style: none; margin: 0; padding: 0; }
.leftSideBar li { margin: 0; padding: 0; }

.leftSideBar a,
.leftSideBar a:visited {
  display: block;
  width: auto;
  color: var(--ww-text);
  background: transparent;
  text-decoration: none;
  padding: 6px 16px;
  border-left: 3px solid transparent;
}
.leftSideBar a:hover {
  color: var(--ww-primary);
  background: var(--ww-surface-alt);
  border-left-color: var(--ww-accent);
}
.leftSideBar .thisPage {
  display: block;
  color: var(--ww-primary);
  background: var(--ww-surface-alt);
  font-weight: 600;
  padding: 6px 16px;
  border-left: 3px solid var(--ww-primary);
}
.leftSideBar .sideBarText {
  color: var(--ww-text);
  background: transparent;
  line-height: 1.4;
  margin: 8px 16px 16px 16px;
  padding: 0;
  display: block;
}

/* Flyout menu - overrides the colours flyout-menu.php writes into the page.
   "body #page" raises specificity above that inline <style> block. */
body #page .flyoutmenu { font-size: 100%; }
body #page .flyoutmenu ul {
  width: 100%;
  box-sizing: border-box;
  padding-left: 0;
}
.leftSideBar ul { box-sizing: border-box; }
body #page .flyoutmenu li {
  float: none;
  color: var(--ww-text);
  background: transparent none;
}
body #page .flyoutmenu li.sub {
  background: transparent url(ajax-images/flyout-sub.gif) no-repeat right 12px center;
}
body #page .flyoutmenu a,
body #page .flyoutmenu a:visited {
  width: auto;
  line-height: 1.4;
  color: var(--ww-text);
  background: transparent;
  padding: 7px 16px;
  border: 0;
  border-left: 3px solid transparent;
}
body #page .flyoutmenu li:hover > a,
body #page .flyoutmenu a:hover,
body #page .flyoutmenu a:focus,
body #page .flyoutmenu a:active {
  color: var(--ww-primary);
  background: var(--ww-surface-alt);
  border-left-color: var(--ww-accent);
}
/* sub menus: floating card */
body #page .flyoutmenu li ul {
  top: -8px;
  left: 180px;
  width: 220px;
  padding: 8px;
  background: transparent;
}
body #page .flyoutmenu li ul li {
  background: var(--ww-surface);
}
body #page .flyoutmenu li ul li:first-child { border-radius: 10px 10px 0 0; padding-top: 6px; }
body #page .flyoutmenu li ul li:last-child  { border-radius: 0 0 10px 10px; padding-bottom: 6px; }
body #page .flyoutmenu li ul {
  filter: drop-shadow(0 6px 14px rgba(16,32,56,.18));
}

/* ----- Main content ----------------------------------------------------- */

#main-copy,
#blog-main {
  color: var(--ww-text);
  background: var(--ww-surface);
  text-align: left;
  line-height: 1.6;
  margin: 0 0 18px 208px;
  padding: 20px 26px 24px 26px;
  border: 0;
  border-radius: var(--ww-radius);
  box-shadow: var(--ww-shadow);
  overflow-x: auto;   /* wide tables scroll instead of breaking the layout */
  min-height: 400px;
}
#main-copy-dark,
#blog-main-dark {
  color: #fff;
  background: #1d2733;
  margin: 0 0 18px 208px;
  padding: 20px 26px;
  border: 0;
  border-radius: var(--ww-radius);
}

#main-copy h1,
#blog-main h1 {
  color: var(--ww-text);
  background: transparent;
  font-family: var(--ww-font);
  font-size: 26px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: -.01em;
  margin: 0 0 12px 0;
  padding: 0 0 10px 0;
  border: 0;
  border-bottom: 1px solid var(--ww-border);
}
#main-copy h2, #blog-main h2 { font-size: 20px; font-weight: 600; margin: 1.2em 0 .4em 0; padding: 0; text-align: left; }
#main-copy h3, #blog-main h3 { font-size: 17px; font-weight: 600; color: var(--ww-primary); margin: 1.4em 0 .3em 0; }
#main-copy h3:first-child   { margin-top: 0; }

#main-copy a, #blog-main a {
  color: var(--ww-link);
  background: transparent;
  text-decoration: none;
}
#main-copy a:hover, #blog-main a:hover { text-decoration: underline; }

/* generic tables inside content */
#main-copy table { border-collapse: collapse; }
#main-copy table td, #main-copy table th { padding: 4px 8px; }

.table-top {
  color: #fff;
  background: var(--ww-primary);
  text-align: left;
  font-weight: 600;
}
.table-top td, .table-top th { padding: 6px 8px; }

.column-dark  { color: var(--ww-text); background: var(--ww-surface-alt); border-radius: 8px; }
#main-copy > .column-dark { background: transparent; }   /* home page wrapper */
/* the dashboard's outer table carries an inline grey "border:solid" - soften it */
#main-copy table[style*="border:solid"] {
  border: 1px solid var(--ww-border) !important;
  border-radius: 12px;
  background: var(--ww-surface);
  padding: 4px;
}
.column-light { color: var(--ww-text); background: var(--ww-surface); }

.thread-alt  { color: var(--ww-text); background: var(--ww-surface-alt); }
.thread-even { color: var(--ww-text); background: var(--ww-surface); }

/* ----- Alert boxes ------------------------------------------------------ */

.watchBox, .advisoryBox, .advisoryBoxnoactive, .warningBox, .tornadowarningBox {
  font-size: 14px;
  text-align: center;
  margin: 0 0 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 0;
}
.advisoryBoxnoactive { color: var(--ww-muted); background: var(--ww-surface-alt); border: 1px solid var(--ww-border); }
.advisoryBox  { color: #4a3600; background: #ffe79a; border-left: 5px solid #e0b000; }
.watchBox     { color: #4a2400; background: #ffd2a1; border-left: 5px solid #f08a00; }
.warningBox, .tornadowarningBox { color: #fff; background: #c62828; border-left: 5px solid #8e0000; }
#main-copy .watchBox a, #main-copy .advisoryBox a { color: inherit; text-decoration: underline; }
#main-copy .warningBox a, #main-copy .tornadowarningBox a { color: #fff; text-decoration: underline; }

/* ----- AJAX dashboard (home page) -------------------------------------- */

.ajaxDashboard {
  font-size: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
}
.ajaxDashboard .datahead,
.ajaxDashboard .datahead2 {
  font-family: var(--ww-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  background: var(--ww-primary);
  text-align: center;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px 8px 0 0;
}
.ajaxDashboard .data1,
.ajaxDashboard .data2 {
  color: var(--ww-text);
  font-family: var(--ww-font);
  font-size: 13px;
  background: var(--ww-surface);
  text-align: left;
}
.ajaxDashboard .data1 { border-bottom: 1px solid var(--ww-border); }
.ajaxDashboard td { border: none; background: var(--ww-surface); }

/* ----- AJAX sidebar (optional) ----------------------------------------- */

.ajaxSidebar { background: transparent; border: none; width: auto; }
.ajaxSidebar h2 {
  font-size: 13px; color: #fff; background: var(--ww-primary);
  text-align: center; margin: 0 8px; border-radius: 6px; padding: 3px 0;
}
.ajaxSidebar .meas { font: 12px var(--ww-font); color: var(--ww-muted); text-align: right; background: transparent; width: 35%; }
.ajaxSidebar .data { font: 13px var(--ww-font); color: var(--ww-primary); text-align: left; background: transparent; }
.ajaxSidebar td    { border: none; background: transparent; }

/* ----- Footer ----------------------------------------------------------- */

#footer {
  clear: both;
  color: var(--ww-muted);
  background: transparent;
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
  margin: 0;
  padding: 18px 8px 28px 8px;
  border-top: 1px solid var(--ww-border);
}
#footer div { margin: 0; padding: 0 0 6px 0; }
#footer a, #footer a:visited {
  color: var(--ww-link);
  background: transparent;
  text-decoration: none;
  font-weight: 500;
}
#footer a:hover { text-decoration: underline; }
/* hide "Contact Us" (and the "|" separators) in the footer's first row */
#footer > .doNotPrint { font-size: 0; }
#footer > .doNotPrint a { font-size: 13px; margin: 0 10px; }
#footer > .doNotPrint a[title="E-mail us"] { display: none; }

/* ----- Misc template bits ---------------------------------------------- */

.jsuparrow   { background: var(--ww-primary); border: 0; color: #fff; text-decoration: none; }
.jsupoutline { background: var(--ww-primary); border: 0; height: 15px; left: 0; padding: 0; position: absolute; top: 0; width: 24px; border-radius: 4px; }

#horizontal-menu ul { list-style: none; margin: 0; padding: 0; }
#horizontal-menu ul li { display: inline; padding: .2em 1em; }
.menuLinkSelectedhoriz { background: var(--ww-primary); color: #fff; width: 100px; padding: .2em; border-radius: 4px; }
.menuLinkSelected      { display: block; background: var(--ww-primary); color: #fff; width: auto; padding: .2em .4em; border-radius: 4px; }

/* WordPress add-on styles kept from the stock theme (harmless if unused) */
#sidebar { padding: 1.5em; width: 150px; float: right; background: var(--ww-surface-alt); margin: 5px; border-radius: 8px; font: 12px var(--ww-font); color: var(--ww-text); }
#sidebar form { margin: 0; }
#sidebar ul, #sidebar ul ol { margin: 0; padding: 0; }
#sidebar ul li { list-style: none; margin-bottom: 0; }
.aligncenter, div.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignright { float: right; }
.alignleft  { float: left; }
img.centered { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { border: 1px solid var(--ww-border); text-align: center; background: var(--ww-surface-alt); padding-top: 4px; margin: 10px; border-radius: 8px; }

/* ----- Tablet & phone --------------------------------------------------- */

@media (max-width: 860px) {
  body, html > body { font-size: 15px; }
  #page { margin: 12px auto; padding: 0 12px; }

  #header { padding: 14px 16px 12px 16px; }
  .headerTitle { font-size: 24px; }
  .headerTemp, [class~="headerTemp"] { font-size: 38px; margin-top: -38px; }
  .subHeaderRight { float: none; max-width: none; text-align: left; margin-top: 12px; clear: both; }

  .leftSideBar {
    float: none;
    width: auto;
    padding: 6px 0;
  }
  /* navigation becomes a wrapping row of "chips" */
  body #page .flyoutmenu ul,
  .leftSideBar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 10px;
  }
  body #page .flyoutmenu li ul { display: block; left: 0; top: 100%; width: 220px; }
  body #page .flyoutmenu li.sub { padding-right: 18px; background-position: right 6px center; }
  body #page .flyoutmenu a,
  body #page .flyoutmenu a:visited,
  .leftSideBar a, .leftSideBar a:visited, .leftSideBar .thisPage {
    border-left: 0;
    border-radius: 999px;
    padding: 5px 12px;
    background: var(--ww-surface-alt);
  }
  body #page .flyoutmenu li ul a { border-radius: 0; background: transparent; }
  .leftSideBar .sideBarTitle { padding: 0 14px; }

  #main-copy, #blog-main, #main-copy-dark, #blog-main-dark {
    margin-left: 0;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .headerTitle { font-size: 21px; }
  .headerTemp, [class~="headerTemp"] { float: none; display: block; margin: 8px 0 0 0; font-size: 34px; }
  .subHeader { float: none; }
  #main-copy h1 { font-size: 22px; }
}
