/* Miami-Dade County document records demo */

:root {
  --navy: #1f3f73;
  --navy-dark: #15305a;
  --blue: #2a6ebb;
  --blue-dark: #1f5aa0;
  --blue-light: #eef2fb;
  --green: #3aa655;
  --ink: #222;
  --muted: #666;
  --line: #d9dee7;
  --panel: #f3f3f3;
  --bg: #fff;
  --warn: #b35c00;
  --error: #b00020;
  --radius: 4px;
  --wrap: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; font-size: 15px; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: #f0f2f6; padding: 0 .3em; border-radius: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .9em; }
.error { color: var(--error); }
.warn { color: var(--warn); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.sub { display: block; color: var(--muted); font-size: .85em; }
.loading, .placeholder { color: var(--ink); }
.loading::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 6px; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Buttons */
.btn { display: inline-block; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: var(--radius); padding: 8px 20px; font: inherit; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border-color: #c8ccd4; }
.btn.ghost:hover { background: #f3f5f9; }
.btn:disabled { opacity: .5; cursor: default; }

/* Logo (an original wordmark in the county's colors) */
.mdc-logo { display: inline-flex; flex-direction: column; justify-content: center; position: relative; text-decoration: none; color: #fff; background: var(--navy); padding: 4px 26px 4px 8px; border-radius: 3px; line-height: 1; overflow: hidden; min-width: 96px; }
.mdc-logo-word { font-weight: 800; font-size: 13px; letter-spacing: .3px; }
.mdc-logo-county { font-weight: 800; font-size: 11px; background: var(--green); display: inline-block; padding: 1px 4px; margin-top: 2px; align-self: flex-start; }
.mdc-logo-arc { position: absolute; right: -14px; top: -4px; width: 40px; height: 44px; border-radius: 50%; border: 6px solid #fff; border-left-color: transparent; border-bottom-color: transparent; transform: rotate(20deg); opacity: .9; }

/* Status banner */
.status-banner { background: #f7f9fc; border-bottom: 1px solid var(--line); color: #444; font-size: 13px; padding: 6px 16px; text-align: center; min-height: 30px; }
.status-banner:empty { display: none; }
.status-banner.demo { background: #fff6e5; color: #6b4300; }
.status-banner.warn { background: #fdecea; color: var(--error); }

/* ---------- Portal header (home) ---------- */
.utility-bar { background: var(--navy); color: #fff; font-size: 12px; }
.utility-inner { display: flex; justify-content: flex-end; gap: 22px; padding-top: 7px; padding-bottom: 7px; }
.utility-bar a { color: #fff; text-decoration: none; }
.portal-nav { background: #fff; border-bottom: 1px solid var(--line); }
.portal-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.portal-menu { display: flex; flex: 1; }
.portal-menu a { color: var(--ink); text-decoration: none; font-size: 13.5px; padding: 0 16px; border-left: 1px solid var(--line); line-height: 60px; }
.caret { display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: 5px; }
.caret.light { border-color: #fff; }
.portal-right { display: flex; align-items: center; gap: 14px; }
.round-search { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.login { color: var(--ink); text-decoration: none; font-size: 14px; }

.portal-page { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; padding-top: 20px; padding-bottom: 48px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.portal-main h1 { font-size: 30px; color: var(--navy); font-weight: 600; }
.next-meeting { margin: 14px 0; }
.accordion { margin-top: 10px; }
.accordion.focus .accordion-head { outline: 2px dashed #6ac2e0; outline-offset: 3px; }
.accordion-head { width: 100%; display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--line); padding: 14px 18px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-align: left; }
.acc-icon { position: relative; width: 14px; height: 14px; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; background: var(--ink); left: 0; top: 6px; width: 14px; height: 2px; }
.acc-icon::after { transform: rotate(90deg); }
.accordion-head[aria-expanded="true"] .acc-icon::after { display: none; }
.accordion-body { padding: 12px 0 18px; }
.year { font-size: 15px; font-weight: 700; margin: 14px 0 6px; }
.dates { list-style: none; padding: 0 0 0 14px; margin: 0; }
.dates li { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.dates .chev { flex: none; }
.dates a { color: var(--blue); }
.dates .board { color: var(--muted); font-size: 12.5px; margin-left: 6px; }

.portal-rail p { font-size: 14px; }
.rail-btn { display: block; background: var(--navy); color: #fff; text-align: center; font-weight: 600; font-size: 13px; padding: 10px 12px; margin: 10px 0; text-decoration: none; letter-spacing: .2px; }
.rail-btn:hover { background: var(--navy-dark); color: #fff; }
.rail-card { border: 1px solid var(--line); margin-top: 20px; }
.rail-photo { height: 110px; background: linear-gradient(180deg, #f6b26b 0%, #e67e22 45%, #2c3e50 46%, #1b2838 100%); position: relative; }
.rail-photo::after { content: ""; position: absolute; left: 20%; bottom: 0; width: 60%; height: 55%; background: repeating-linear-gradient(90deg, #111 0 6px, transparent 6px 26px); opacity: .5; }
.rail-card-body { padding: 14px 16px; font-size: 13.5px; }
.rail-card-body h2 { color: var(--blue); font-size: 15px; margin-bottom: 8px; }
.rail-person span { color: var(--blue); }

/* ---------- DERM header + search page ---------- */
.derm-bar { background: var(--blue); color: #fff; }
.derm-inner { display: flex; align-items: center; gap: 20px; height: 68px; max-width: none; padding: 0 14px; }
.derm-title { flex: 1; font-size: 15px; font-weight: 700; margin: 0; }
.derm-links { display: flex; gap: 16px; white-space: nowrap; }
.derm-links a { color: #fff; text-decoration: none; font-size: 14.5px; }
.derm-links a[aria-current] { text-decoration: underline; }

.derm-page { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: calc(100vh - 100px); }
.attr-panel { background: var(--panel); padding: 18px 12px 24px; border-right: 1px solid #e4e4e4; }
.attr-title { color: var(--blue); font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.minus { width: 13px; height: 13px; border: 1px solid var(--blue); background: #fff; padding: 0; position: relative; cursor: pointer; }
.minus::before { content: ""; position: absolute; left: 2px; right: 2px; top: 5px; height: 1px; background: var(--blue); }
.minus[aria-expanded="false"]::after { content: ""; position: absolute; top: 2px; bottom: 2px; left: 5px; width: 1px; background: var(--blue); }
.attr-panel label { display: block; font-size: 11.5px; margin-bottom: 8px; }
.attr-panel input, .attr-panel select { display: block; width: 100%; margin-top: 2px; padding: 4px 6px; font: inherit; font-size: 13px; border: 1px solid #bbb; border-radius: 3px; background: #fff; height: 27px; }
.attr-panel input:focus, .attr-panel select:focus { outline: 2px solid #111; outline-offset: -1px; }
.attr-buttons { display: flex; gap: 8px; margin-top: 14px; }
.attr-buttons .btn { padding: 8px 16px; }

.results-panel { padding: 22px 24px 40px; }
.results-panel h2 { font-size: 22px; font-weight: 700; }
.keyword-row { display: flex; gap: 8px; margin: 8px 0 14px; max-width: 760px; }
.keyword-row input { flex: 1; padding: 8px 10px; font: inherit; font-size: 14px; border: 1px solid #bbb; border-radius: 3px; }
.results-summary { color: var(--muted); font-size: 13.5px; margin: 0 0 8px; min-height: 1.2em; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.results-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.results-table th { text-align: left; background: var(--blue-light); color: var(--navy); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid #cfd8ea; white-space: nowrap; }
.results-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.results-table tbody tr { cursor: pointer; }
.results-table tbody tr:hover { background: #f6f8fc; }
.results-table .doc a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.results-table .desc { color: var(--muted); font-size: 12px; margin-top: 3px; max-width: 420px; }
.file-icon { flex: none; }
.pager { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-size: 13.5px; }

/* ---------- Plan header + record page ---------- */
.plan-bar { background: var(--navy); }
.plan-links { display: flex; justify-content: center; gap: 26px; height: 32px; align-items: center; flex-wrap: wrap; }
.plan-links a { color: #fff; text-decoration: none; font-size: 13.5px; display: inline-flex; align-items: center; gap: 5px; }
.badge { background: var(--blue); color: #fff; border-radius: 50%; width: 16px; height: 16px; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }

.plan-page { padding-top: 22px; padding-bottom: 48px; }
.plan-heading { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.link-row { font-size: 13.5px; margin: 0 0 12px; }
.plan-card { position: relative; background: var(--blue-light); border: 1px solid #e3e8f5; padding: 22px 36px 18px 20px; margin-bottom: 26px; }
.collapse { position: absolute; right: 10px; top: 8px; background: none; border: 0; color: var(--blue); font-size: 16px; cursor: pointer; }
.collapse[aria-expanded="false"] { transform: rotate(180deg); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; font-size: 14px; }
.cell { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.cell .label { font-weight: 700; text-align: right; }
.cell .value { word-break: break-word; }
.cell.wide { grid-column: 1 / -1; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab { background: var(--blue-light); color: var(--blue); border: 0; border-radius: 16px; padding: 7px 16px; font: inherit; font-size: 13.5px; cursor: pointer; }
.tab.active { background: var(--blue); color: #fff; }
.tab:hover:not(.active) { background: #e2e9f8; }
.tab-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.attach-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.attach-table th { text-align: left; background: var(--blue-light); color: var(--navy); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid #cfd8ea; }
.attach-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.attach-table tr.current td { background: #fbfcff; }
.attach-table .doc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.attach-table .doc a { min-width: 140px; overflow-wrap: anywhere; }
.pill { background: var(--green); color: #fff; font-size: 10.5px; border-radius: 10px; padding: 1px 7px; margin-left: 6px; }
.preview-title { margin-top: 22px; font-size: 15px; }
.agenda-strip { background: #6d8fcf; color: #fff; text-align: center; padding: 12px; margin: 8px 0 12px; font-size: 14px; }
.pdf-frame { border: 1px solid var(--line); background: #525659; min-height: 320px; max-height: 1100px; overflow: auto; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pdf-frame iframe { width: 100%; height: 760px; border: 0; display: block; background: #fff; }
.pdf-page { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); max-width: 100%; }
.pdf-status { color: #fff; margin: 0; }
.pdf-status a { color: #fff; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 16px; font-size: 14px; margin: 0 0 14px; }
.kv dt { font-weight: 700; text-align: right; }
.kv dd { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #d9e2f2; font-size: 12.5px; margin-top: 30px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.site-footer a { color: #fff; }
.footer-links { display: flex; gap: 16px; }
.footer-note { flex-basis: 100%; color: #a9b8d6; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .portal-page { grid-template-columns: 1fr; gap: 28px; }
  .portal-menu { display: none; }
  .derm-page { grid-template-columns: 1fr; }
  .attr-panel { border-right: 0; border-bottom: 1px solid #e4e4e4; }
  .attr-panel form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; }
  .attr-buttons { grid-column: 1 / -1; }
  .derm-inner { height: auto; flex-wrap: wrap; padding: 10px 14px; }
  .derm-title { flex-basis: 100%; order: 3; font-size: 14px; }
  .derm-links { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
  .grid { grid-template-columns: 1fr; }
  .cell { grid-template-columns: 110px minmax(0, 1fr); }
  .kv { grid-template-columns: 120px minmax(0, 1fr); }
  .pdf-frame { height: 70vh; }
}
@media (max-width: 600px) {
  body { overflow-x: hidden; }
  .status-banner { font-size: 12px; }
  .results-table th:nth-child(3), .results-table td:nth-child(3),
  .results-table th:nth-child(4), .results-table td:nth-child(4),
  .results-table th:nth-child(5), .results-table td:nth-child(5),
  .results-table th:nth-child(7), .results-table td:nth-child(7),
  .attach-table th:nth-child(3), .attach-table td:nth-child(3),
  .attach-table th:nth-child(5), .attach-table td:nth-child(5),
  .attach-table th:nth-child(6), .attach-table td:nth-child(6) { display: none; }
  .results-table .doc a span { overflow-wrap: anywhere; }
  .results-table .desc { max-width: none; }
  .results-panel { padding: 18px 12px 32px; }
  .keyword-row { flex-wrap: wrap; }
  .keyword-row input { flex-basis: 100%; }
  .cell { grid-template-columns: 1fr; gap: 2px; }
  .cell .label { text-align: left; }
  .plan-card { padding: 18px 16px; }
  .plan-links { gap: 14px; height: auto; padding: 6px 10px; }
  .pdf-frame { padding: 8px; }
}
