/* ============================================================================
   appdot-reports-v2.css
   Shared styles for the statistical report list pages (Courts, Finance,
   BCC Payment Registers, BCC Held Performance Bonds).

   Load AFTER the shared site stylesheet (embed_head_modern-v2.html).
   Matches the working courts page: content wrappers use .rpt-* names the
   site stylesheet has no rules for, so its viewport-height reservations
   cannot attach. Only html/body/#main-content/#site-header are touched,
   and only to neutralise the few shared rules that reach these pages.
   The table box has NO height cap: the page scrolls naturally, 25 rows
   per page keeps it short. No footer on these pages.
   ========================================================================== */

/* ---- Neutralise the few shared rules that reach these pages ---- */
html{height:auto !important;background:#fff !important;}
body.page-reports{
  display:block !important;
  height:auto !important;
  min-height:0 !important;
  margin:0 !important;
  background:#fff !important;
  text-align:left !important;
}
body.page-reports #main-content{
  display:block !important;
  flex:none !important;
  height:auto !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  background:#fff;
}
/* The banner image only spans part of the width; paint the strip navy. */
body.page-reports #site-header{background:#041E41;}
.rpt-catform {
  display: contents;
}
/* ---- Page wrapper ---- */
.rpt-shell{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:16px clamp(12px,2vw,48px) 20px;
}

/* ---- Panel ---- */
.rpt-panel{
  border:1px solid #dbe3ef;
  border-radius:10px;
  background:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
  overflow:hidden;
}
.rpt-panel__header{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  background:#b7bbc0;
  border-bottom:1px solid #dcdcdc;
}
.rpt-title{
  margin:0;
  font-family:Arial, system-ui, sans-serif;
  font-size:clamp(1.125rem,0.9vw + 0.875rem,1.25rem);
  font-weight:700;
  color:#1f2a37;
  letter-spacing:.2px;
}
.rpt-panel__body{padding:12px;}

/* ---- Meta strip: intro, toolbar, count ---- */
.rpt-meta{
  border:1px solid #dcdcdc;
  border-radius:8px;
  background:#f7f7f7;
  padding:10px 12px;
  margin-bottom:10px;
}
.rpt-intro{
  font-size:.95rem;
  line-height:1.45;
  color:#333;
  margin:0 0 8px;
}
.rpt-toolbar{
  display:flex;
  align-items:flex-end;
  gap:8px 18px;
  flex-wrap:wrap;
}
.rpt-toolbar .field{display:flex;flex-direction:column;gap:4px;}
.rpt-toolbar label{font-size:.85rem;font-weight:700;color:#041e41;}
.rpt-toolbar input[type="search"],
.rpt-toolbar select{
  font:inherit;
  padding:8px 10px;
  min-height:44px;
  border:1px solid #6b7684;
  border-radius:6px;
  background:#fff;
  color:#1a1a1a;
}
.rpt-toolbar input[type="search"]{min-width:min(240px,100%);}
.rpt-toolbar input:focus,.rpt-toolbar input:focus-visible,
.rpt-toolbar select:focus,.rpt-toolbar select:focus-visible{
  outline:3px solid #c8a020;outline-offset:2px;
}
.rpt-count{font-size:.9rem;color:#41474f;margin:8px 0 0;}

/* ---- Table (no height cap - the page scrolls naturally) ---- */
.rpt-tablebox{
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid #dbe3ef;
  border-radius:10px;
}
.rpt-tablebox:focus,
.rpt-tablebox:focus-visible{outline:3px solid #c8a020;outline-offset:2px;}
table.rpt-table{width:100%;border-collapse:collapse;background:#fff;}
.rpt-table thead th{
  background:#041e41;
  color:#fff;
  text-align:left;
  font-size:.9rem;
  font-weight:700;
  padding:0;
  border-bottom:2px solid #c8a020;
  position:sticky;
  top:0;
  z-index:2;
}
.rpt-table thead th .th-label{display:block;padding:12px 14px;}
.rpt-table thead th.col-date{white-space:nowrap;}
.rpt-table tbody td{
  padding:10px 14px;
  border-bottom:1px solid #e3e8ef;
  font-size:.95rem;
  line-height:1.3;
  vertical-align:top;
}
.rpt-table tbody tr:nth-child(even){background:rgba(72,103,149,.06);}
.rpt-table tbody tr:hover{background:#eef3fb;}
.rpt-table td.col-date{white-space:nowrap;color:#444;}

/* Links: the shared sheet strips underlines with !important; restore them
   the same way - colour-only links fail WCAG 1.4.1 */
.rpt-table a,
.rpt-table a:link{
  color:#3666c9 !important;
  text-decoration:underline !important;
  font-weight:600;
  word-break:break-word;
  scroll-margin-top:56px;
}
.rpt-table a:visited{color:#772a3d !important;}
.rpt-table a:hover{color:#254a94 !important;}
.rpt-table a:focus,
.rpt-table a:focus-visible{outline:3px solid #c8a020;outline-offset:2px;border-radius:3px;}

/* File type badge. VISIBLE and part of the link's accessible name, so both
   sighted users and screen reader users are told the link opens a
   spreadsheet/PDF before they activate it (addresses the WAVE alert
   "Link to Excel spreadsheet": inform the user of the file type). */
.rpt-table a .file-ext{
  display:inline-block;
  margin-left:6px;
  padding:1px 6px;
  font-size:.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:#0a2342;
  background:#dbeafe;
  border:1px solid #a9c8ef;
  border-radius:3px;
  text-decoration:none !important;
}

/* ---- Sort buttons in the header row ---- */
.rpt-table thead th button.sort-btn{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:44px;
  padding:12px 14px;
  font:inherit;
  color:#fff;
  background:transparent;
  border:0;
  text-align:left;
  cursor:pointer;
}
.rpt-table thead th button.sort-btn:hover{background:#0a2f63;text-decoration:underline;}
.rpt-table thead th button.sort-btn:focus,
.rpt-table thead th button.sort-btn:focus-visible{outline:3px solid #ffd166;outline-offset:-3px;}
.rpt-table thead th .sort-ind{font-size:.8em;line-height:1;opacity:.55;}
.rpt-table thead th[aria-sort] .sort-ind{opacity:1;}

/* ---- Pager: right-aligned under the box ---- */
.rpt-pager{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.rpt-pager button{
  font:inherit;
  font-weight:600;
  min-height:44px;
  padding:9px 16px;
  color:#3666c9;
  background:#fff;
  border:1px solid #3666c9;
  border-radius:6px;
  cursor:pointer;
}
.rpt-pager button:hover:enabled{background:#eef3fb;}
.rpt-pager button:focus,
.rpt-pager button:focus-visible{outline:3px solid #c8a020;outline-offset:2px;}
.rpt-pager button:disabled{color:#5a6472;border-color:#b7bec8;cursor:default;}
.rpt-pager__status{font-size:.95rem;color:#41474f;white-space:nowrap;}
@media (max-width:520px){
  .rpt-pager{justify-content:space-between;}
}

.rpt-empty{
  padding:20px 16px;
  background:#f7f7f7;
  border:1px solid #dcdcdc;
  border-radius:8px;
  color:#333;
  font-size:.95rem;
}

@media (prefers-reduced-motion:reduce){
  .rpt-shell *{scroll-behavior:auto !important;transition:none !important;}
}