/* =========================================================================
   FOIA — site styles (Bootstrap 5 + these overrides).
   The home page uses its own classic look: see css/home.css and Shared/_LayoutHome.cshtml.
   ========================================================================= */
:root {
    --brand-900: #0f2a47;
    --brand-800: #163a61;
    --brand-700: #1f4e79;
    --brand-600: #2a64a0;
    --brand-100: #e8f0f9;
    --brand-50: #f3f7fc;
    --gold: #c9a227;
    --ink: #1f2933;
    --muted: #5f6b7a;
    --line: #dfe5ec;
    --surface: #ffffff;
    --page: #f5f7fa;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 42, 71, .06), 0 1px 3px rgba(16, 42, 71, .08);
    --shadow-md: 0 4px 12px rgba(16, 42, 71, .08), 0 2px 4px rgba(16, 42, 71, .06);

    /* Bootstrap theme hooks */
    --bs-primary: var(--brand-700);
    --bs-primary-rgb: 31, 78, 121;
    --bs-link-color: var(--brand-600);
    --bs-link-color-rgb: 42, 100, 160;
    --bs-link-hover-color: var(--brand-800);
    --bs-link-hover-color-rgb: 22, 58, 97;
    --bs-body-color: var(--ink);
    --bs-body-font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --bs-border-color: var(--line);
    --bs-border-radius: 8px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--page);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { color: var(--brand-900); font-weight: 600; letter-spacing: -.01em; }
h4 { font-size: 1.15rem; margin-top: .5rem; }
hr { border-color: var(--line); opacity: 1; }
a { text-underline-offset: 2px; }

.skip-link {
    position: absolute; left: 1rem; top: .5rem; z-index: 3000;
    background: #fff; padding: .5rem 1rem; border-radius: 6px; box-shadow: var(--shadow-md);
}

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(115deg, var(--brand-900) 0%, var(--brand-700) 70%, var(--brand-600) 100%);
    border-bottom: 3px solid var(--gold);
    color: #fff;
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .9rem;
    padding-bottom: .9rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

    .brand:hover { color: #fff; }

.brand__seal {
    width: 64px;
    height: 64px;
    flex: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25));
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__office { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #c9d8ea; }
.brand__title { font-size: 1.35rem; font-weight: 600; }

.site-header__aside { display: flex; align-items: center; gap: 1.25rem; flex: none; }
.site-header__date { color: #c9d8ea; font-size: .9rem; }

.header-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-size: .9rem;
}

    .header-btn:hover, .header-btn:focus, .header-btn.show {
        color: var(--brand-900);
        background: #fff;
        border-color: #fff;
    }

/* ---------- Page heading ---------- */
.page-heading {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.page-heading__title {
    font-size: 1.5rem;
    margin: 0;
    padding: 1.1rem 0;
}

.site-main {
    flex: 1 0 auto;
    padding-top: 1.75rem;
    padding-bottom: 3rem;
}

/* The agent menu bar sits on the page background as its own white strip. */
.site-main > nav.navbar {
    background: var(--surface) !important;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .25rem .5rem !important;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

    .site-main > nav.navbar + hr { display: none; }
    .site-main > nav.navbar .nav-link { color: var(--brand-800); font-weight: 500; }
    .site-main > nav.navbar .nav-link:hover { color: var(--brand-600); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--brand-900);
    color: #b9c8da;
    font-size: .875rem;
    margin-top: auto;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.site-footer__name { color: #fff; font-weight: 600; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__links a { color: #dbe6f3; text-decoration: none; }
.site-footer__links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Surfaces ---------- */
.box-panel, .surface {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.card {
    border-color: var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s ease, border-color .15s ease;
}

    .card:hover { border-color: #c8d3df; box-shadow: var(--shadow-md); }

.table { --bs-table-bg: var(--surface); }
.table > thead { --bs-table-bg: var(--brand-50); }
.table th { color: var(--brand-900); font-weight: 600; white-space: nowrap; }
.table th a { color: inherit; }

.list-group-item.active { background: var(--brand-700); border-color: var(--brand-700); }

/* ---------- Forms & buttons ---------- */
.form-control, .form-select { border-color: #cbd5e1; }
    .form-control:focus, .form-select:focus, .form-check-input:focus {
        border-color: var(--brand-600);
        box-shadow: 0 0 0 .2rem rgba(42, 100, 160, .2);
    }
.form-check-input:checked { background-color: var(--brand-700); border-color: var(--brand-700); }

.btn { border-radius: 8px; font-weight: 500; }

.btn-primary {
    --bs-btn-bg: var(--brand-700);
    --bs-btn-border-color: var(--brand-700);
    --bs-btn-hover-bg: var(--brand-800);
    --bs-btn-hover-border-color: var(--brand-800);
    --bs-btn-active-bg: var(--brand-900);
    --bs-btn-active-border-color: var(--brand-900);
    --bs-btn-disabled-bg: var(--brand-700);
    --bs-btn-disabled-border-color: var(--brand-700);
    font-weight: 600;
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-700);
    --bs-btn-border-color: var(--brand-700);
    --bs-btn-hover-bg: var(--brand-700);
    --bs-btn-hover-border-color: var(--brand-700);
    --bs-btn-active-bg: var(--brand-800);
    --bs-btn-active-border-color: var(--brand-800);
}

.pagination { --bs-pagination-color: var(--brand-700); --bs-pagination-active-bg: var(--brand-700); --bs-pagination-active-border-color: var(--brand-700); }
.badge.bg-primary { background-color: var(--brand-700) !important; }

/* ---------- Text helpers used across pages ---------- */
.textHeader { color: var(--brand-900); font-size: 1.15rem; font-weight: 600; }
.textLabel { font-weight: 600; font-size: .85rem; color: var(--muted); }
.textLegal, .textSmall { font-size: .875rem; }
.textSub { font-size: .875rem; color: var(--muted); }
.CCTO_Alert { color: #b42318; }
.pre-wrap { white-space: pre-wrap; }

.collapsible-text {
    font-size: .85rem;
    height: 50px;
    overflow: hidden;
    white-space: pre-wrap;
    color: var(--muted);
}

    .collapsible-text.expanded { height: auto; }

.toggle-link { color: var(--brand-600); cursor: pointer; font-size: .85rem; }
.toggle-link:hover { text-decoration: underline; }

/* ---------- Sign-in / account cards ---------- */
.auth-card {
    max-width: 440px;
    margin: 1.5rem auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand-700);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 2rem 2.25rem;
}

.auth-card__title { font-size: 1.6rem; margin-bottom: .25rem; }
.auth-card__subtitle { color: var(--muted); margin-bottom: 1.5rem; }
.auth-card .form-label { font-weight: 600; font-size: .9rem; }
.auth-card__footer {
    border-top: 1px solid var(--line);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    text-align: center;
    color: var(--muted);
}

.callout {
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-left: 4px solid var(--brand-600);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

@media (max-width: 575.98px) {
    .site-header__aside { width: 100%; justify-content: flex-end; }
    .auth-card { padding: 1.5rem; }
    .brand__seal { width: 48px; height: 48px; }
    .brand__title { font-size: 1.1rem; }
    .brand__office { font-size: .7rem; }
}

/* ---------- Request progress tracker ---------- */
.progress-tracker { display: flex; margin: 1.5rem auto .5rem; padding: 0; list-style: none; }
.progress-text p { margin-bottom: 0; color: var(--muted); }
.progress-step { flex: 1 1 0%; margin: 0; padding: 0; min-width: 24px; }
    .progress-step:last-child { flex-grow: 0; }
        .progress-step:last-child .progress-marker::after { display: none; }
.progress-marker { display: block; position: relative; }
    .progress-marker::before {
        content: attr(data-text);
        display: flex; justify-content: center; align-items: center;
        position: relative; z-index: 20;
        width: 24px; height: 24px; border-radius: 50%;
        transition: background-color .3s;
    }
    .progress-marker::after {
        content: '';
        display: block; position: absolute; z-index: -10;
        top: 10px; right: -12px; width: 100%; height: 4px;
        transition: background-color .3s;
    }
.progress-text { display: block; padding: 8px; overflow: hidden; text-overflow: ellipsis; }
.progress-step .progress-marker::before, .progress-step .progress-marker::after { background-color: #cfd8e3; }
.progress-step .progress-text { color: var(--ink); }
.progress-step.is-active .progress-marker::before { background-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(42, 100, 160, .2); }
.progress-step.is-complete .progress-marker::before { background-color: var(--brand-700); }
.progress-step.is-complete .progress-marker::after { background-color: var(--brand-600); }
.progress-tracker--center { text-align: center; }
    .progress-tracker--center .progress-step:last-child { flex-grow: 1; }
    .progress-tracker--center .progress-marker::before { margin-left: auto; margin-right: auto; }
    .progress-tracker--center .progress-marker::after { right: -50%; }

/* ---------- Move to top ---------- */
#moveToTopBtn {
    display: none;
    position: fixed; bottom: 20px; right: 20px; z-index: 99;
    width: 44px; height: 44px;
    border: none; border-radius: 50%;
    background-color: var(--brand-700); color: #fff;
    font-size: 1.1rem; cursor: pointer;
    box-shadow: var(--shadow-md);
}

    #moveToTopBtn:hover { background-color: var(--brand-900); }

/* ---------- Busy overlay ---------- */
.busy-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(245, 247, 250, .8);
    align-items: center; justify-content: center;
}

    .busy-overlay.show { display: flex; }
