/* Archive pages – search, table and pagination (used with /assets/js/archive.js) */

/* ---------- Search / filter bar ----------
   Sizes use max(rem, px): never smaller than the px value, but still grow when a visitor
   uses the site's A+ text-size buttons. !important is needed because the site's main
   stylesheet sets small fixed sizes on labels, buttons and paragraphs. */
#archive .archive-controls .form-label {
  font-size: max(1.25rem, 20px) !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin-bottom: 8px !important;
  color: #1a1a1a !important;
  display: block;
}

#archive .archive-controls .form-control,
#archive .archive-controls .form-select,
#archive .archive-controls .btn {
  height: max(3.75rem, 60px) !important;
  min-height: max(3.75rem, 60px) !important;
  font-size: max(1.25rem, 20px) !important;
  line-height: 1.4 !important;
  box-sizing: border-box;
}
#archive .archive-controls .form-control,
#archive .archive-controls .form-select {
  padding: 10px 16px !important;
  border: 2px solid #6c757d !important;
  color: #1a1a1a !important;
}
#archive .archive-controls .form-select { padding-right: 44px !important; }
#archive .archive-controls .form-control::placeholder { color: #595959; opacity: 1; }

/* Clear button: solid, high-contrast (white on dark blue = 12:1) */
#archive .archive-controls .btn {
  width: 100%;
  padding: 10px 20px !important;
  font-weight: 700 !important;
  color: #fff !important;
  background-color: #1b3a6b !important;
  border: 2px solid #1b3a6b !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#archive .archive-controls .btn:hover { background-color: #0f2447 !important; border-color: #0f2447 !important; }

#archive .archive-controls .form-control:focus-visible,
#archive .archive-controls .form-select:focus-visible,
#archive .archive-controls .btn:focus-visible {
  outline: 4px solid #000 !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #ffbf47 !important;   /* yellow halo – visible on any background */
}

/* ---------- Results line ---------- */
#archive .archive-status {
  margin: 8px 0 16px !important;
  font-size: max(1.25rem, 20px) !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: #1a1a1a !important;
}
#archive .archive-status:focus { outline: 3px solid currentColor; outline-offset: 3px; }

/* ---------- Table ---------- */
.archive-table { margin-bottom: 1.25rem; }
.archive-table th { white-space: nowrap; padding: .75rem; }
.archive-table td { vertical-align: top; text-align: left; padding: .75rem; }   /* DBIM: left-aligned body text */
.archive-table .archive-sno { width: 5.5rem; text-align: center; }
.archive-table .archive-date { width: 8.5rem; white-space: nowrap; }
.archive-table a { text-decoration: underline; }
.archive-table .file-type { white-space: nowrap; }

/* ---------- Pagination ---------- */
#archive .archive-pager .pagination { gap: 8px; margin-top: 8px; }
#archive .archive-pager .page-link {
  min-width: max(3.75rem, 60px);
  min-height: max(3.75rem, 60px);
  padding: 8px 18px !important;
  font-size: max(1.25rem, 20px) !important;
  font-weight: 700 !important;
  color: #1b3a6b !important;
  background: #fff !important;
  border: 2px solid #1b3a6b !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px !important;   /* separate rounded buttons instead of one joined bar */
  margin-left: 0 !important;
}
#archive .archive-pager .page-link:hover { background: #e8eef7 !important; }
#archive .archive-pager .page-item.active .page-link { color: #fff !important; background: #1b3a6b !important; }
#archive .archive-pager .page-item.disabled .page-link { color: #6c757d !important; border-color: #adb5bd !important; }
#archive .archive-pager .page-link:focus-visible {
  outline: 4px solid #000 !important; outline-offset: 2px;
  box-shadow: 0 0 0 6px #ffbf47 !important; z-index: 3;
}

/* ---------- Small screens ---------- */
@media (max-width: 575.98px) {
  .archive-table .archive-sno { width: 3rem; }
  .archive-table .archive-date { width: auto; }
  #archive .archive-pager .page-link { min-width: 52px; min-height: 52px; padding: 6px 12px !important; }
}
