/* Design tokens */
:root {
    --color-brand-navy: #293648;
    --color-text-muted: #999;
    --color-form-border: #d1d1d1;
}

/* Section headings */
.heading-section {
    color: var(--color-brand-navy);
    font-weight: 600;
}

.heading-divider {
    border: none;
    border-top: 2px solid var(--color-brand-navy);
    margin: 0 0 1rem;
}

/* Override Bootstrap's text-muted to a lighter gray */
.text-muted {
    color: var(--color-text-muted) !important;
}

/* Darken form control borders */
.form-control,
.form-select,
.form-check-input {
    border-color: var(--color-form-border);
}

/* Change log modal */
.change-log-table thead {
    background-color: #eee;
}

/* Login page logo styling - scoped to not affect other pages */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px); /* Account for header/footer */
    width: 100%;
}

.login-container h1 {
    font-size: 2rem;
}

h1, .h1 {
    font-size: 1.7rem;
}

h2, .h2 {
    font-size: 1.3rem;
}


.login-logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.login-logo-section img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    width: auto;
    height: auto;
}

/* Login page navbar - white text on dark background */
#login-nav {
    background-color: #293648 !important;
}

.login-nav-container {
    padding: 0 140px 0 30px;
}

#login-nav .navbar-brand,
#login-nav .nav-link {
    color: white !important;
}

#login-nav .navbar-brand:hover,
#login-nav .nav-link:hover {
    color: #CCC !important;
}

/* Nav top icons - keep all items inline including form */
.nav-top-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-top-icons form {
    display: flex;
    margin: 0;
}

.nav-top-icons form button {
    white-space: nowrap;
}

/* Logout button styling */
#top-nav #logout {
    margin-left: 15px;
    white-space: nowrap;
}

/* Manage nav pills - custom color scheme */
.nav-pills .nav-item {
    margin-bottom: 0.5rem;
}

.nav-pills .nav-link {
    color: #293648 !important;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #293648 !important;
    color: white !important;
}

/* Hover on inactive items: subtle tint */
.nav-pills .nav-link:hover {
    color: #293648 !important;
    background-color: rgba(41, 54, 72, 0.1);
}

/* Hover on the active (current-page) item: keep text white, darken background */
.nav-pills .nav-link.active:hover,
.nav-pills .show > .nav-link:hover {
    background-color: #1d2838 !important;
    color: white !important;
}

/* Primary buttons - use custom blue color */
.btn-primary {
    background-color: #293648 !important;
    border-color: #293648 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1d2838 !important;
    border-color: #1d2838 !important;
}

.layout-h1 {
    margin-top: 50px;
}

.layout-body {
    margin-bottom: 20px;
}

.profile-h3 {
    margin-bottom: 20px;
}



.card-header {
    font-weight: bold;
}

.footer {
    margin-top: 10px;
}

.accordion-button {
    background-color: #eee !important;
}

    .accordion-button:focus {
        box-shadow: none;
    }

    .accordion-button:not(.collapsed) {
        background-color: #eee;
    }

code.recovery-code {
    color: #15490B;
}

/* Zip Code search icon (magnifying glass) shown next to Zip labels */
.zip-search-link {
    margin-left: .25rem;
    text-decoration: none;
    color: #3ea415;
}

.zip-search-link:hover,
.zip-search-link:focus {
    color: #1d5209;
}

/* Darker fieldset borders so sections stand out from the lighter input borders */
.fieldset-section {
    border-color: #71757a !important;
    border-radius: 8px;
}

/* Display-only identifier values on the Edit Student screen. The label and value sit on one
   line; the value's min-height keeps a blank value from collapsing so the rows stay aligned
   with their populated siblings. */
.readonly-field {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

    .readonly-field .form-label {
        margin-bottom: 0;
        white-space: nowrap;
    }

.readonly-value {
    min-height: 1.5em;
    font-weight: 600;
}

/* Edit Student sub-navigation. Ported from the legacy nav-sub-student-detail.inc inline
   <style> block; kept here rather than in Student.cshtml.css because Razor Pages CSS
   isolation does not apply its scope attribute to markup inside a partial. */
.student-subnav {
    display: block;
    background-color: #EEE;
    margin: 20px auto;
    padding: 18px 30px;
    font-size: 15px;
    border: 1px solid #1d3454;
    border-top: 10px solid #1d3454;
    border-radius: 10px;
}

    /* The legacy cluster heading treatment lived in nav.css under #top-nav, so it never
       applied here. Ported from .mega-menu-group-label, using the underline offsets that
       give the headings their separated look. */
    .student-subnav h6 {
        color: #1d3454;
        font-size: 1rem;
        font-weight: bold;
        padding-bottom: 12px;
        margin-bottom: 0;
        text-decoration: underline;
        text-underline-offset: 13px;
        text-decoration-thickness: 1px;
        text-decoration-color: #CCC;
    }

    .student-subnav ul li {
        margin-bottom: 0.25rem;
        padding-bottom: 10px;
    }

    /* Ported from #top-nav .mega-menu-cluster a. Without this the links fall back to the
       default Bootstrap blue/underline instead of the legacy navy dotted-hover treatment. */
    .student-subnav a {
        color: #1d3454;
        text-decoration: none;
    }

        .student-subnav a:hover,
        .student-subnav a:focus-visible {
            color: #293648;
            text-decoration: underline;
            text-decoration-style: dotted;
            text-underline-offset: 7px;
            text-decoration-color: #1d345482;
        }

/* Required-field indicator (red asterisk after the label text) */
.required-indicator {
    color: #dc3545;
    font-weight: 700;
}

/* "* indicates a required field" legend near the top of the form */
.required-legend {
    color: #6c757d;
    font-size: .875rem;
}

.required-legend .required-indicator {
    font-weight: 700;
}

/* Add Student confirmation summary: keep row spacing consistent even when a value is blank,   since an empty <dd> would otherwise collapse and shrink that row's height. Also add a
   horizontal divider and alternating row backgrounds so the eye can scan from label to value. */
.summary-list > dt,
.summary-list > dd {
    min-height: 1.5em;
    margin-bottom: 0;
    padding-top: .4rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid #e9ecef;
}

/* Each dt/dd pair forms one logical row; shade every other row (both the label and its value
   share the same nth-of-type index since dt/dd alternate one-for-one). */
.summary-list > dt:nth-of-type(odd),
.summary-list > dd:nth-of-type(odd) {
    background-color: #f8f9fa;
}

/* Inline mode for the <txngs-country-state> widget: the wrapper is removed from layout so its
   Country/State columns become direct children of the surrounding .row and can share a line
   with other form controls. The element still exists in the DOM for the JS to hook into. */
.country-state-contents {
    display: contents;
}

/* Bootstrap applies column gutters through the direct-child selector `.row > *`. Because the
   wrapper above uses display:contents, that selector matches the wrapper rather than the
   columns inside it, so those columns lose their horizontal padding and gutter margin-top
   (fields look pressed together and raised above the rest of the row). Re-apply the same
   gutter values to the wrapper's children so they align with their sibling columns. */
.row > .country-state-contents > * {
    padding-right: calc(var(--bs-gutter-x) * .5);
    padding-left: calc(var(--bs-gutter-x) * .5);
    margin-top: var(--bs-gutter-y);
}

/* Alerts admin listing (Active/Scheduled/Inactive sections on /Admin/Announcements). Each section
   renders as its own <table>, so browser auto-layout sizes every table's columns independently
   based on that table's own content - one section can end up with narrower or wider columns than
   another even though the tables share the same header labels. table-layout: fixed plus an
   explicit width per column (matched by class between <th> and <td>) forces identical column
   widths across all three tables regardless of what content each section happens to contain. */
.alerts-table {
    table-layout: fixed;
    width: 100%;
}

.alert-col-date {
    width: 7rem;
}

.alert-col-modified {
    width: 10rem;
}

.alert-col-priority {
    width: 5rem;
}

.alert-col-actions {
    width: 11rem;
}

/* The Preview cell renders author-supplied HTML, which may contain a very long unbroken run of
   characters (a pasted URL, for example). overflow-wrap forces long words to break so the preview
   wraps within its fixed column width instead of stretching the table and causing a horizontal
   scrollbar. */
.alert-preview-cell {
    width: 38rem;
}

.alert-preview-cell .alert {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

/* Author HTML can also include wide block content (tables, <pre>); keep it inside the column. */
.alert-preview-cell .alert > * {
    max-width: 100%;
}
