/* =========================================================
   Roseburg Interagency Communication Center — Main Styles
   ========================================================= */

/* ---------- Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root{
  --green-1: #000000;
  --green-2: #000000;
  --nav:     #caad68;
  --nav-text: #000000;
  --nav-text-hover: #8bdcff;
  --bg:      #ffffff;
  --text:    #111111;
  --white:   #ffffff;
  --danger:  #ff2e2e;

  --header-bg:#000000;
  --sidebar-left-bg:#db0000;
  --sidebar-text: #ffffff;
  --sidebar-link-border: #5c5c5c;
  --sidebar-title-color: #ffffff;
  /* Preparedness level colors */
  --ig-prep-1: #43a047;
  --ig-prep-2: #1565c0;
  --ig-prep-3: #f57c00;
  --ig-prep-4: #e53935;
  --ig-prep-5: #b71c1c;
  /* Inactive status badge colors */
  --badge-unavailable: #78909c;
  --badge-committed-local: #2e7d32;
  --badge-committed:   #8e44ad;
  --badge-oos:         #c0392b;
  --badge-unstaffed:   #7f8c8d;
  --badge-smoke-chase: #e65100;
  --badge-daysoff:     #1565c0;
  /* Available status badge colors */
  --badge-avail-local:    #1565c0;
  --badge-avail-gacc:     #f57f17;
  --badge-avail-national: #880e4f;}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
}

/* ---------- Header Banner ---------- */
.header-banner {
  position: relative;
  text-align: center;
  background: #000;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
}

.banner-logo {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-height: 350px;
  max-width: 80%;
  width: auto;
  z-index: 2;
}

.banner-title {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 1.5rem;
  text-shadow: 1px 1px 3px #000;
  z-index: 2;
}

/* ---------- Under-bar Navigation ---------- */
.under-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  background: var(--nav);
  padding: 12px 0;
  margin: 0;
  border-bottom: 0 solid #2e8b57; /* set to 3px for a green divider if desired */
}

.tab-link,
.tab-link:visited {
  color: var(--nav-text) !important;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  margin: 0 18px;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.tab-link:hover,
.tab-link:focus {
  color: var(--nav-text-hover) !important;
  text-decoration: underline;
}

/* ---------- Layout ---------- */
.wrapper {
  display: flex;
  width: 100%;
  margin: 0 auto;
  align-items: stretch;
}

/* ---------- Sidebars ---------- */
.left-sidebar,
.right-sidebar {
  background: var(--green-1);
  color: var(--sidebar-text);
  padding: 16px 14px;
}

.left-sidebar { width: 300px; }
.right-sidebar { width: 300px; }

/* Section grouping */
.left-sidebar section,
.right-sidebar section {
  margin-bottom: 18px;
}

/* Section heading */
.left-sidebar h3,
.right-sidebar h3 {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--sidebar-title-color);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.2);
}

/* Right sidebar h2 (intel graphic header etc) */
.right-sidebar h2 {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--sidebar-title-color);
  background: none;
  border-radius: 0;
  margin: 0 0 8px;
  padding: 0 0 6px;
  border-bottom: 1px solid rgba(255,255,255,.2);
  text-align: left;
}

.left-sidebar ul,
.right-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.left-sidebar li,
.right-sidebar li {
  margin: 0;
}

/* Link pill style */
.left-sidebar a,
.right-sidebar a {
  display: block;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(0,0,0,.12);
  border: 1px solid var(--sidebar-link-border);
  line-height: 1.35;
  transition: background .15s, border-color .15s, transform .1s;
}

.left-sidebar a:hover,
.right-sidebar a:hover {
  background: rgba(0,0,0,.25);
  border-color: var(--sidebar-link-border);
  text-decoration: none;
  transform: translateX(2px);
}

/* ---------- Center Rail Layout (Resource Status scaffolding) ---------- */
.full-width-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #0b1722;
}

.green-border {
  background: var(--green-1);
  width: 0; /* set to 150px to show green rails */
}

.main-content {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  background: #fff;
  color: #0b1a11; /* dark text for readability */
  padding: 40px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
}

/* Centered content helper */
.content-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Main image helper */
.main-image {
  max-width: 50%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* ---------- Tables ---------- */
.table {
  color: #0b1a11;
}

thead.custom-green th {
  background: var(--green-1) !important;
  color: #fff !important;
}

.table tbody td {
  font-weight: 500;
}

#planned-burns .table-wrap th,
#planned-burns .table-wrap td {
  vertical-align: middle;
  text-align: center;
}

/* Allow table text to wrap */
.table th,
.table td {
  max-width: 200px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- Separators ---------- */
hr {
  border: none;
  height: 3px;
  background: var(--green-1);
  margin: 10px 0;
  border-radius: 2px;
}
.welcome-rule {
  border: none;
  height: 4px;
  background: var(--nav);
  margin: 10px 0;
  border-radius: 2px;
}
/* ---------- Welcome Section ---------- */
.welcome {
  text-align: center;
  margin: 10px auto 8px;
}

.welcome h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 8px 0 4px;
  color: #000;
}

.welcome .datetime {
  font-size: 1.2rem;
  margin: 4px 0 8px;
}

.welcome .subtitle {
  font-size: 1.05rem;
  margin: 4px 0 8px;
  font-style: italic;
  color: #333;
}

.welcome .emergency {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--danger);
  text-transform: uppercase;
  margin-top: 6px;
}

.welcome-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
  color: #000;
}

/* ---------- Responsive Iframe ---------- */
.responsive-iframe {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin-top: 16px;
  border: 4px solid var(--green-1);
  border-radius: 8px;
  background: #e6f2eb;
  box-shadow: 0 0 10px rgba(0,0,0,.1);
}

.responsive-iframe iframe {
  position: absolute;
  inset: 0;
  width: 95%;
  height: 100%;
  border: none;
}

/* PDF container helper */
.pdf-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- Footer ---------- */
footer {
  background: var(--nav);
  color: #fff;
  text-align: center;
  padding: 20px;
}

.footer-overlay img {
  height: 50px;
}

/* ---------- Responsive Tweaks ---------- */
/* ── 1200px: narrow sidebars ── */
@media (max-width: 1200px) {
  .left-sidebar  { width: 220px; }
  .right-sidebar { width: 220px; }
}

/* ── 1024px: collapse sidebars below main ── */
@media (max-width: 1024px) {
  .wrapper {
    flex-direction: column;
  }
  .left-sidebar,
  .right-sidebar {
    width: 100%;
    max-width: 100%;
  }
  /* sidebar sections become inline scrollable rows */
  .left-sidebar section,
  .right-sidebar section {
    display: inline-block;
    vertical-align: top;
    min-width: 200px;
    max-width: 280px;
    margin-right: 16px;
  }
  .left-sidebar,
  .right-sidebar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    padding: 12px 16px;
  }
}

/* ── 900px: reduce spacing ── */
@media (max-width: 900px) {
  .green-border { width: 40px; }
  .main-content { padding: 20px; }
  /* underbar: horizontal scroll instead of wrapping */
  .under-bar {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 12px;
    gap: 0;
    scrollbar-width: none;
  }
  .under-bar::-webkit-scrollbar { display: none; }
  .tab-link { margin: 0 12px; white-space: nowrap; font-size: .82rem; }
}

/* ── 700px: mobile ── */
@media (max-width: 700px) {
  .main-content { padding: 14px; }
  .green-border { width: 24px; }

  /* Tables: horizontal scroll */
  .fires-table-wrap,
  .sr-table-wrap,
  .ar-table-wrap,
  .rx-table-wrap,
  .tr-table-wrap,
  .fa-table-wrap,
  .su-table-wrap,
  .igc-grid-wrap,
  .wx-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Welcome section */
  .welcome h1      { font-size: 1.5rem; }
  .welcome .datetime { font-size: .9rem; }

  /* Sidebar: stack vertically */
  .left-sidebar,
  .right-sidebar {
    flex-direction: column;
    padding: 12px;
  }
  .left-sidebar section,
  .right-sidebar section {
    display: block;
    min-width: unset;
    max-width: unset;
    margin-right: 0;
  }

  /* Pub btn bar: full width buttons */
  .pub-btn-bar { justify-content: center; }
  .pub-btn { flex: 1; justify-content: center; max-width: 200px; }

  /* Resource status cards: single column */
  .si-grid { grid-template-columns: 1fr !important; }

  /* Current Conditions: ensure scroll not expand */
  .igc-section { overflow: hidden; }

  /* Nav font */
  .tab-link { font-size: .78rem; margin: 0 8px; }
}

/* ── 480px: small phones ── */
@media (max-width: 480px) {
  .banner-img    { height: 220px; }
  .banner-logo   { max-height: 160px; max-width: 70%; }
  .banner-title  { font-size: 1.1rem; }
  .welcome h1    { font-size: 1.3rem; }
  .welcome .datetime { font-size: .85rem; }
  .welcome .emergency { font-size: 1rem; }
  .main-content  { padding: 10px; }

  /* Admin tool cards: 2 per row minimum */
  .pub-btn { max-width: 160px; font-size: .78rem; padding: 7px 14px; }

  /* Nav: shrink and wrap so all links fit */
  .tab-link { font-size: .72rem; margin: 0 5px; white-space: nowrap; }
  .under-bar { padding: 8px 4px; gap: 2px; justify-content: center; flex-wrap: wrap; }
}

/* ── 380px: very small phones ── */
@media (max-width: 380px) {
  .banner-logo { max-height: 130px; max-width: 65%; }
  .tab-link    { font-size: .68rem; margin: 0 4px; }
}
