/* Prevent layout shift when scrollbar appears/disappears */
html {
  overflow-y: scroll;
}

/* ─── ACCESSIBILITY OVERRIDES ────────────────────────────────────────── */
/* WSDOT theme sets breadcrumb li.active to #777 on #f4f4f5 (4.07:1).
   Darken to #595959 for WCAG AA 4.5:1 contrast compliance. */
.breadcrumb > li.active {
  color: #595959;
}


/* ─── PAGE LAYOUT ────────────────────────────────────────────────────── */
/* Override Bootstrap container to allow wider content area */
.main-container.container {
  max-width: 1280px;
  width: 100%;
}

.page-outer {
  padding: 28px 0 60px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

/* ─── MAIN CONTENT ───────────────────────────────────────────────────── */
.page-h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 4px;
}
.page-program-name {
  font-size: 1.5rem;
  color: #555;
  font-style: italic;
  margin-bottom: 10px;
}
.page-intro {
  font-size: 1.6rem;
  color: #444;
  max-width: 750px;
  line-height: 1.65;
  margin-bottom: 6px;
}
.data-as-of {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 1.2rem;
  color: #666;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 3px 10px;
}

/* ─── HELP LINK ──────────────────────────────────────────────────────── */
.help-link-bar {
  margin-bottom: 18px;
  font-size: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.help-link-bar a {
  color: #00704A;
  text-decoration: none;
  font-weight: 600;
}
.help-link-bar a:hover { text-decoration: underline; }
.help-link-separator {
  color: #767676;
  margin: 0 2px;
}

/* ─── SEARCH FORM ────────────────────────────────────────────────────── */
.search-box {
  background: #f0f9f5;
  border: 1px solid #b3dece;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 24px;
}
.search-box h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #00704A;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  border-bottom: 2px solid #00704A;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 20px;
  margin-bottom: 14px;
}
#main-content .form-group { display: flex; flex-direction: column; gap: 4px; }
#main-content .form-group label {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
}
#main-content .form-group input,
#main-content .form-group select {
  padding: 7px 10px;
  border: 1px solid #9fcfb8;
  border-radius: 3px;
  font-size: 1.3rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  height: 36px;
}
#main-content .form-group input:focus,
#main-content .form-group select:focus {
  outline: 2px solid #00704A;
  outline-offset: 0;
  border-color: #00704A;
}
#main-content .form-group input::placeholder { color: #aaa; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 4px; }

/* WSDOT-style primary button */
.btn-primary {
  background: #00704A;
  color: #fff;
  border: none;
  padding: 9px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border-radius: 3px;
  letter-spacing: 0.04em;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-primary:hover { background: #005a3c; }

/* Lock search/clear buttons against Bootstrap/WSDOT overrides on all states */
.form-actions .btn-primary,
.form-actions .btn-primary:hover,
.form-actions .btn-primary:focus,
.form-actions .btn-primary:active {
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  max-width: none;
  border: none;
  padding: 9px 22px;
  font-size: 1.4rem;
  line-height: normal;
  box-shadow: none;
  outline-offset: 0;
  transition: background 0.15s;
  flex-shrink: 0;
  flex-grow: 0;
}
.btn-secondary {
    background: #00704A;
    color: #fff;
    border: none;
    padding: 9px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border-radius: 3px;
    letter-spacing: 0.04em;
    transition: background 0.15s;
}
.btn-secondary:hover {background: #005a3c; }
.form-hint { font-size: 1.5rem; color: #666; font-style: italic; margin-left: 4px; }

/* ─── RESULTS AREA ───────────────────────────────────────────────────── */
.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.results-count { font-size: 1.2rem; color: #444; }
.results-count strong { color: #1a1a1a; }
.results-tools { display: flex; gap: 8px; }
.btn-tool {
  background: #fff;
  border: 1px solid #9fcfb8;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 1.2rem;
  font-family: inherit;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: border-color 0.12s, color 0.12s;
  text-decoration: none;
}
.btn-tool:hover { border-color: #00704A; color: #00704A; }

/* ─── ACCORDION ──────────────────────────────────────────────────────── */
.results-table {
  border: 1px solid #b3dece;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px;
}
.results-thead {
    display: grid;
    grid-template-columns: 1fr 200px 36px;
    background: #00704A;
    color: #fff;
    padding: 9px 14px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.acc-item {
  border-top: 1px solid #c8e8d8;
}
.acc-item:first-child { border-top: none; }
.acc-row {
  display: grid;
  grid-template-columns: 1fr 200px 36px;
  align-items: center;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
  background: #fff;
}
.acc-row:hover { background: #f0f9f5; }
.acc-item.open .acc-row { background: #e0f2ea; }
.acc-name {
  font-weight: 600;
  font-size: 1.3rem;
  color: #4A5157;
}
.acc-qual {
  font-size: 1.3rem;
  color: #555;
  font-family: 'Courier New', monospace;
}
.acc-toggle {
  width: 24px; height: 24px;
  border: 1px solid #9fcfb8;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  font-weight: 300;
  color: #4A5157;
  justify-self: center;
  transition: background 0.1s, color 0.1s;
}
.acc-item.open .acc-toggle {
  background: #00704A;
  color: #fff;
  border-color: #00704A;
}

/* ─── EXPANDED DETAIL ────────────────────────────────────────────────── */
.acc-detail {
  display: none;
  background: #f5fbf8;
  border-top: 1px solid #b3dece;
  overflow-x: auto;
}
.acc-item.open .acc-detail { display: block; }
.detail-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.2rem;
}
.detail-tbl thead tr { background: #d0ece1; }
.detail-tbl thead th {
  padding: 7px 14px;
  text-align: left;
  font-size: 1.3rem;
  font-weight: 700;
  color: #4A5157;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #9fd4be;
}
.detail-tbl tbody tr { border-bottom: 1px solid #e0f0f0; }
.detail-tbl tbody tr:last-child { border-bottom: none; }
.detail-tbl tbody tr:hover { background: #eaf6f1; }
.detail-tbl td { padding: 8px 14px; }
.detail-tbl tr.exp td { color: #999; background: #f5f5f5; }
.detail-tbl tr.exp:hover { background: #efefef; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge-q  { background: #e6f4ed; color: #00704A; }
.badge-ex { background: #fce8e8; color: #b00; }
.bdot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.badge-q  .bdot { background: #00704A; }
.badge-ex .bdot { background: #b00; }
.badge-act { background: #e3f2fd; color: #1565C0; }
.badge-act .bdot { background: #1565C0; }
.badge-pen { background: #f5f5f5; color: #666; }
.badge-pen .bdot { background: #666; }
.badge-sus { background: #fff3e0; color: #b54000; }
.badge-sus .bdot { background: #b54000; }

/* ─── PAGINATION ─────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  border-top: 1px solid #c8e8d8;
  background: #f5fbf8;
  justify-content: center;
  margin: 0;
}
.pg-btn {
  min-width: 32px; height: 32px;
  padding: 0 8px;
  border: 1px solid #9fcfb8;
  border-radius: 3px;
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  text-decoration: none;
}
.pg-btn:hover { border-color: #00704A; color: #00704A; background: #f0f9f5; }
.pg-btn.active { background: #00704A; border-color: #00704A; color: #fff; font-weight: 700; }
.pg-btn.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ─── EMPTY STATE ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #595959;
  background: #f5fbf8;
  border: 1px solid #b3dece;
  border-radius: 4px;
}
.empty-state p { font-size: 1.3rem; line-height: 1.6; max-width: 500px; margin: 10px auto 0; }

/* ─── NO RESULTS STATE ───────────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #595959;
  background: #f5fbf8;
  border: 1px solid #b3dece;
  border-radius: 4px;
}
.no-results p { font-size: 0.95rem; line-height: 1.6; max-width: 420px; margin: 10px auto 0; }

/* ─── RIGHT SIDEBAR ──────────────────────────────────────────────────── */
.sidebar-section {
  margin-bottom: 28px;
}
.sidebar-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #00704A;
  padding-bottom: 8px;
  border-bottom: 2px solid #00704A;
  margin-bottom: 10px;
}
.sidebar-section ul { list-style: none; padding-left: 0; }
.sidebar-section ul li { border-bottom: 1px solid #e8e8e8; }
.sidebar-section ul li:last-child { border-bottom: none; }
.sidebar-section ul li a {
  display: block;
  padding: 8px 0;
  font-size: 1.2rem;
  color: #00704A;
  text-decoration: none;
  line-height: 1.35;
}
.sidebar-section ul li a:hover { text-decoration: underline; color: #005a3c; }
.status-definitions { margin: 0; }
.status-definitions dt { margin-bottom: 2px; }
.status-definitions dd {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  color: #555;
  line-height: 1.4;
}
.status-definitions dd:last-child { margin-bottom: 0; }
.sidebar-note {
  background: #fff8e1;
  border-left: 4px solid #f0c000;
  padding: 10px 14px;
  font-size: 1.2rem;
  color: #444;
  line-height: 1.55;
  margin-bottom: 20px;
  border-radius: 0 3px 3px 0;
}
.sidebar-note strong { color: #333; display: block; margin-bottom: 3px; }

/* ─── SIDEBAR CONTACT CARD ───────────────────────────────────────────── */
.sidebar-contact {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 24px;
  background: #fff;
}
.sidebar-contact p { margin: 0 0 6px; }

/* ─── CONTACT PAGE ──────────────────────────────────────────────────── */
.contact-page {
  max-width: 620px;
  padding: 28px 0 60px;
}
.contact-intro {
  font-size: 1.6rem;
  color: #444;
  line-height: 1.65;
  margin-bottom: 4px;
}
.contact-hours {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 20px;
}
.contact-success {
  background: #e6f4ed;
  border: 1px solid #00704A;
  border-left: 4px solid #00704A;
  color: #005a3c;
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.contact-error {
  background: #fce8e8;
  border: 1px solid #d32f2f;
  border-left: 4px solid #d32f2f;
  color: #b00;
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.contact-error:empty { display: none; }
.contact-form {
  background: #f0f9f5;
  border: 1px solid #b3dece;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
}
.contact-field {
  margin-bottom: 16px;
}
.contact-field label {
  display: block;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 4px;
  color: #333;
}
.contact-field .form-control {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #9fcfb8;
  border-radius: 3px;
  font-size: 1.5rem;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
}
.contact-field .form-control:focus {
  outline: 2px solid #00704A;
  outline-offset: 0;
  border-color: #00704A;
}
.contact-field textarea.form-control { resize: vertical; }
.contact-field .field-validation-error {
  display: block;
  font-size: 1.5rem;
  color: #d32f2f;
  margin-top: 3px;
}
.req { color: #d32f2f; font-weight: bold; }
.contact-submit {
  font-size: 1.5rem;
  padding: 10px 28px;
}
.contact-back {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}
.contact-back a {
  font-size: 1.5rem;
  font-weight: 600;
  color: #4A5157;
  text-decoration: none;
}
.contact-back a:hover { text-decoration: underline; }

/* ─── HELP PAGE ─────────────────────────────────────────────────────────── */

/* TOC */
.help-toc {
  background: #f0f9f5;
  border: 1px solid #b3dece;
  border-radius: 4px;
  padding: 14px 20px;
  margin-bottom: 20px;
}
.help-toc h2 {
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4A5157;
  margin-bottom: 6px;
  border: none;
}
.help-toc ol { padding-left: 20px; border: none; margin: 0; }
.help-toc ol li { break-inside: avoid; border: none; box-shadow: none; outline: none; font-size: 1.3rem; }
.help-toc ol li a {
  display: block;
  padding: 2px 0;
  font-size: 1.3rem;
  color: #4A5157;
  text-decoration: none;
  border: none;
  box-shadow: none;
}
.help-toc ol li a:hover { text-decoration: underline; }

/* Part dividers */
.part-divider {
  margin-top: 28px;
  border-top: 3px solid #00704A;
  padding-top: 8px;
}
.part-label {
  text-transform: uppercase;
  color: #4A5157;
  letter-spacing: 0.08em;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

/* Sections */
.help-section {
  margin-bottom: 20px;
  scroll-margin-top: 20px;
}
.help-section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #4A5157;
  padding-bottom: 6px;
  border-bottom: 2px solid #b3dece;
  margin-top: 24px;
  margin-bottom: 8px;
}
.help-section h3 {
  font-size: 1.7rem;
  font-weight: 700;
  color: #333;
  margin: 16px 0 6px;
}
.help-section p {
  font-size: 1.3rem;
  color: #333;
  line-height: 1.65;
  margin-bottom: 8px;
  max-width: 720px;
}

/* Tables - dark green header, striped rows */
.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.3rem;
  margin: 10px 0 16px;
}
.help-table thead tr { background: #00704A; }
.help-table thead th {
  padding: 8px 14px;
  text-align: left;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid #b3dece;
}
.help-table tbody tr { border-bottom: 1px solid #e0e0e0; }
.help-table tbody tr:last-child { border-bottom: none; }
.help-table tbody td {
  padding: 10px 14px;
  vertical-align: top;
  line-height: 1.5;
  border: 1px solid #b3dece;
}
.help-table tbody tr:nth-child(even) td { background: #f0f9f5; }
.help-table tbody tr:hover td { background: #e4f3ec; }

/* Field name class for first-column table cells */
.field-name { font-weight: 700; color: #4A5157; }

/* Step boxes */
.step-box {
  background: #f0f9f5;
  border: 1px solid #b3dece;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 8px 0 12px;
}
.step-box ol {
  padding-left: 20px;
  margin: 0;
}
.step-box ol li {
  font-size: 1.3rem;
  line-height: 1.6;
  color: #333;
  padding: 4px 0;
}

/* Tip callouts */
.tip {
  border-left: 4px solid #1976d2;
  background: #e3f2fd;
  color: #0d47a1;
  border-radius: 0 4px 4px 0;
  padding: 10px 14px;
  margin: 6px 0 10px;
  font-size: 1.3rem;
  line-height: 1.6;
}

/* Bullet lists */
.help-list {
  list-style: none;
  margin: 6px 0 12px;
  padding-left: 0;
}
.help-list > li {
  padding: 6px 0 6px 18px;
  position: relative;
  font-size: 1.3rem;
  line-height: 1.6;
  color: #333;
}
.help-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4A5157;
}

/* Status list */
.help-status-list { margin: 8px 0 12px; }
.help-status-list dt { margin-bottom: 2px; }
.help-status-list dd {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  color: #444;
  line-height: 1.5;
}
.help-status-list dd:last-child { margin-bottom: 0; }

/* FAQ */
.help-faq {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8e8;
}
.help-faq:last-child { border-bottom: none; padding-bottom: 0; }
.help-faq h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}
.help-faq p {
  font-size: 1.3rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Doc footer */
.doc-footer {
  margin-top: 28px;
  border-top: 1px solid #e0e0e0;
  padding-top: 12px;
  color: #767676;
  font-size: 1.3rem;
}

/* Back link */
.help-back {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}
.help-back a {
  font-size: 1.3rem;
  font-weight: 600;
  color: #4A5157;
  text-decoration: none;
}
.help-back a:hover { text-decoration: underline; }

/* Print styles for help page */
@media print {
  .help-back { display: none; }
  .step-box, .tip, .help-table { page-break-inside: avoid; }
  .help-section { page-break-before: auto; }
}

/* ─── FOOTER BOTTOM BAR ────────────────────────────────────────────── */
#block-copyright .field--name-body {
  display: flex;
  align-items: center;
  gap: 60px;
}

#block-copyright .align-left {
  float: none;
  flex-shrink: 0;
}

#block-copyright ul {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */

/* 768px: Main layout breakpoint — stack sidebar below content */
@media (max-width: 768px) {
  .page-outer {
    grid-template-columns: 1fr;
    padding: 20px 0 40px;
    gap: 24px;
  }
}

/* Help TOC single column on mobile */
@media (max-width: 768px) {
  .help-toc ul { columns: 1; }
}

/* 600px: Narrow phone adjustments */
@media (max-width: 600px) {
  /* Reduce fixed qual-number column: 200px → 120px */
  .results-thead,
  .acc-row {
    grid-template-columns: 1fr 120px 36px;
  }

  /* Pagination wraps to avoid overflow */
  .pagination {
    flex-wrap: wrap;
  }
}
