/* The Blue Sheet: keeps the old site's look (pale blue page, Times text, Verdana 11px tables). */
:root {
    --page: #EEF6FF;
    --ink: #000000;
    --link: #0000FF;
    --visited: #003399;
    --title: #5577BB;
    --navy: #000099;
    --rule: #000000;
    --msg: #CC0000;
    --ok: #1d6b3a;
}

body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.4 "Times New Roman", Times, serif; }
a { color: var(--link); }
a:visited { color: var(--visited); }
h1 { font-size: 1.5rem; color: var(--title); text-decoration: underline; font-weight: normal; }
h2.group { font-size: 1.1rem; color: var(--title); margin: 1.5rem 0 .25rem; text-transform: uppercase; }
h3.section { font: bold 13px Verdana, sans-serif; margin: 1rem 0 .25rem; }
.small, .members-foot, .public-foot .small { font: 11px Verdana, sans-serif; }
.center { text-align: center; }
.msg { color: var(--msg); font-weight: bold; }
.ok { color: var(--ok); font-weight: bold; }
.none { font: 11px Verdana, sans-serif; margin: 0 0 .5rem 1rem; }
.nowrap { white-space: nowrap; }
ul.plain { list-style: none; padding-left: 0; }
ul.plain li { margin: .3rem 0; }

/* public pages */
body.public { background: var(--page) url("../images/court-bg.jpg"); }
.public-wrap { max-width: 1100px; padding: 0 16px; margin: 0 auto; }
.public-head { display: flex; flex-wrap: wrap; gap: 0; }
.public-head img { max-width: 100%; height: auto; }
.public-nav { margin: .25rem 0; }
.public-body { padding: 1rem 0 0; max-width: 760px; margin: 0 auto; }
.public-body table.legacy-content { width: 100%; }
.public-foot { text-align: center; margin: 2rem 0; }
.public-foot a.internal { color: #99CCEE; font-size: 12px; }
.legacy-title { color: var(--title); }
.contact { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.contact .label { color: var(--link); }

/* members and admin */
.members-wrap { max-width: 1100px; padding: 0 16px 2rem; margin: 0 auto; }
.masthead { color: var(--navy); font-size: 1.4rem; font-weight: bold; text-align: center; }
.print-masthead { font-size: 1rem; text-align: left; margin: .5rem 0 1rem; }
.members-foot { text-align: center; margin-top: 2rem; }

.cat-form .buttons { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.cat-groups { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cat-groups fieldset { border: 1px solid #c8d6ea; margin: 0; }
.cat-groups legend { font-weight: bold; }
.cat-groups label { display: block; font-size: 14px; }

.table-scroll { overflow-x: auto; }
table.sheet { width: 100%; border-collapse: collapse; font: 11px Verdana, sans-serif; }
table.sheet th { text-align: left; text-decoration: underline; vertical-align: top; padding: 2px 6px 2px 0; }
table.sheet td { vertical-align: top; padding: 3px 6px 3px 0; border-bottom: 1px solid var(--rule); }
table.sheet th.date, table.sheet td.date { text-align: right; white-space: nowrap; }
table.sheet td.inst { white-space: nowrap; }
table.sheet-n th.inst, table.sheet-c th.inst { width: 12%; }

table.fore { border: 1px solid #000; border-collapse: collapse; margin: 0 0 1rem; font-size: 14px; width: 100%; max-width: 720px; }
table.fore th { text-align: left; font-weight: normal; background: #dde9f8; padding: 3px 6px; width: 20%; }
table.fore td { padding: 3px 6px; border: 1px solid #c8d6ea; }

.search-form .row, .login .row, .edit-form .row, .signup .row {
    display: grid; grid-template-columns: 11rem 1fr; gap: .5rem; align-items: center; margin: .35rem 0; max-width: 640px;
}
.search-form .row input[type=date] { max-width: 12rem; }
.signup label { display: block; margin: .3rem 0; }
.signup textarea { width: 100%; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.pager { display: flex; gap: 1rem; }

.labels { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.label-box { border: 1px dashed #999; padding: .5rem; }

@media (max-width: 600px) {
    .search-form .row, .login .row, .edit-form .row, .signup .row { grid-template-columns: 1fr; }
}

@media print {
    body, body.public { background: #fff; }
    .menubar, .cat-form, .search-step, .search-form, .result-bar a { display: none; }
    a { color: #000; text-decoration: none; }
}

/* ---------------- banner + menu (every page) ---------------- */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .75rem 0 .5rem; border-bottom: 3px solid var(--navy); }
.banner-logo img { display: block; max-width: 100%; height: auto; }
.banner-text { color: var(--navy); font-weight: bold; font-size: 1rem; flex: 1 1 260px; }
.banner-county { color: var(--title); font-size: 1.6rem; font-weight: bold; margin-left: auto; }
.banner-pic { max-height: 90px; width: auto; margin-left: auto; }

.menubar { display: flex; flex-wrap: wrap; align-items: center; background: var(--navy); margin: 0 0 1rem; }
.menubar .menu-links { display: flex; flex-wrap: wrap; }
.menubar .menu-links a { color: #fff; text-decoration: none; font: bold 13px Verdana, sans-serif; padding: .6rem .9rem; }
.menubar .menu-links a:hover, .menubar .menu-links a.on { background: var(--title); }
.menubar .menu-user { margin-left: auto; color: #DDE8F5; font: 12px Verdana, sans-serif; padding: 0 .9rem; }
.menu-toggle, .menu-button { display: none; }

/* ---------------- search ---------------- */
.box { background: #fff; border: 1px solid #99AACC; padding: .6rem .9rem; margin: .5rem 0; }
fieldset.box legend { font-weight: bold; }
.hint { font: 11px Verdana, sans-serif; color: #444; margin: 0 0 .4rem; }
.date-row { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.select-all { display: inline-block; margin: 0 0 .5rem; }
.scope { font: 13px Verdana, sans-serif; }
.result-bar { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; font: 13px Verdana, sans-serif; }
.search-form input[type=text], .search-form input:not([type]) { width: 100%; max-width: 420px; }

/* results: same columns in every category */
table.sheet.results { table-layout: fixed; }
table.sheet.results col.c-inst  { width: 11%; }
table.sheet.results col.c-party { width: 16%; }
table.sheet.results col.c-desc  { width: 38%; }
table.sheet.results col.c-date  { width: 9%; }
table.sheet.results col.c-sheet { width: 10%; }
table.sheet.results td { word-wrap: break-word; }
table.sheet.results th.date, table.sheet.results td.date { text-align: left; white-space: normal; }
table.sheet.results .tbsno { display: block; color: #444; }

/* ---------------- phones and narrow windows ---------------- */
@media (max-width: 760px) {
    .members-wrap, .public-wrap { padding: 0 8px 1.5rem; }
    .banner { justify-content: flex-start; }
    .banner-logo img { width: 260px; }
    .banner-county, .banner-pic { margin-left: 0; }
    .banner-pic { display: none; }

    .menu-button { display: block; color: #fff; font: bold 14px Verdana, sans-serif; padding: .6rem .9rem; cursor: pointer; }
    .menubar .menu-links { display: none; width: 100%; flex-direction: column; }
    .menu-toggle:checked ~ .menu-links { display: flex; }
    .menubar .menu-links a { border-top: 1px solid #3344AA; }
    .menubar .menu-user { order: -1; margin-left: auto; }

    /* every sheet / results table becomes one card per row, each cell labeled */
    .table-scroll { overflow-x: visible; }
    table.sheet, table.sheet tbody, table.sheet tr, table.sheet td { display: block; width: auto; }
    table.sheet colgroup, table.sheet thead { display: none; }
    table.sheet tr { background: #fff; border: 1px solid #99AACC; margin: 0 0 .5rem; padding: .35rem .5rem; }
    table.sheet td { border: 0; padding: .15rem 0; text-align: left !important; white-space: normal !important; }
    table.sheet td[data-label]::before { content: attr(data-label); display: block; font: bold 10px Verdana, sans-serif; color: var(--title); text-transform: uppercase; }
    table.sheet td:empty { display: none; }
    table.sheet.results .tbsno { display: inline; margin-left: .4rem; }
    .cat-groups { grid-template-columns: 1fr; }
}

/* ---------- old per-category columns (Mobile sheets, printouts, samples, previews) ---------- */
table.sheet td.num { text-align: right; white-space: nowrap; }
table.sheet td.vs { text-align: center; width: 2em; }
.fullsheet .fs-county { font: bold 1.2rem "Times New Roman", serif; color: var(--title); text-align: center; }
.fullsheet table.fs-head { width: 100%; margin: .25rem 0 .75rem; }
.fullsheet table.fs-head td.right { text-align: right; }
table.details th { text-align: left; padding: 2px 12px 2px 0; vertical-align: top; }
table.details td { padding: 2px 0; }
.fyi-news { margin: 1rem 0; }
@media (max-width: 760px) {
    table.sheet td.vs { display: none; }
    .fullsheet table.fs-head td { display: block; text-align: left !important; }
}

/* ---------- inline edit on the sheet 9999 previews ---------- */
button.ed-btn { display: block; margin-top: 2px; font: 10px Verdana, sans-serif; padding: 0 4px; }
tr.ed-row td { background: #EEF6FF; border: 1px solid #99AACC; padding: 6px; }
tr.ed-row label { display: inline-block; margin: 0 12px 6px 0; font: bold 11px Verdana, sans-serif; }
tr.ed-row input { width: 18rem; max-width: 100%; }
tr.ed-row label.ed-desc { display: block; }
tr.ed-row textarea { display: block; width: 100%; box-sizing: border-box; font: 12px Verdana, sans-serif; }
tr.ed-row .ed-msg { font: bold 11px Verdana, sans-serif; color: #c00; }
