/* ============================================================
   MDE LRCA - Site Stylesheet
   Migrated from Site.Master inline styles with Section 508 enhancements
   ============================================================ */

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f4;
    color: #1a1a1a;
    line-height: 1.5;
}

/* --- Skip Navigation (Section 508) --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #003366;
    color: #ffffff;
    padding: 10px 20px;
    z-index: 10000;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

/* --- Focus Styles (Section 508 - Keyboard Navigation) --- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 2px solid #005599;
    outline-offset: 2px;
}

/* --- Header --- */
.header {
    background: #003366;
    color: #ffffff;
    padding: 0;
}

.header-top {
    background: #002244;
    padding: 8px 20px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top a {
    color: #99ccff;
    text-decoration: none;
}

.header-top a:hover {
    text-decoration: underline;
}

.header-top a:focus {
    outline-color: #ffcc00;
}

.header-logout-btn {
    background: none;
    border: none;
    color: #99ccff;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    padding: 0;
}

.header-logout-btn:hover {
    text-decoration: underline;
}

.header-logout-btn:focus {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}

.header-main {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-main img {
    height: 50px;
}

.header-main h1 {
    font-size: 22px;
    font-weight: 400;
    color: #ffffff;
}

.header-main h1 span {
    display: block;
    font-size: 13px;
    color: #99ccff;
}

/* --- Navigation --- */
.nav {
    background: #004488;
    padding: 0 20px;
}

.nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 15px;
    display: inline-block;
    font-size: 14px;
}

.nav a:hover {
    background: #005599;
}

.nav a:focus {
    outline: 2px solid #ffcc00;
    outline-offset: -2px;
}

.nav a.active {
    background: #006bb3;
    border-bottom: 3px solid #ffcc00;
}

/* --- Content Area --- */
.content {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 20px;
}

/* --- Breadcrumb --- */
.breadcrumb {
    font-size: 12px;
    color: #555555;
    margin-bottom: 15px;
}

.breadcrumb a {
    color: #004488;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* --- Panels --- */
.panel {
    background: #ffffff;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.panel-header {
    background: #003366;
    color: #ffffff;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: 600;
}

.panel-body {
    padding: 15px;
}

/* --- Footer --- */
.footer {
    background: #003366;
    color: #cccccc;
    text-align: center;
    padding: 15px;
    font-size: 12px;
    margin-top: 40px;
}

.footer a {
    color: #ffcc00;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* --- Buttons --- */
.btn {
    padding: 8px 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn:focus {
    outline: 2px solid #005599;
    outline-offset: 2px;
}

.btn-primary {
    background: #004488;
    color: #ffffff;
}

.btn-primary:hover {
    background: #005599;
}

.btn-warning {
    background: #c06800;
    color: #ffffff;
}

.btn-warning:hover {
    background: #d47700;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
    color: #1a1a1a;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #666666;
    font-size: 14px;
    color: #1a1a1a;
    background: #ffffff;
}

.form-control:focus {
    border-color: #005599;
    outline: 2px solid #005599;
    outline-offset: -1px;
}

/* --- Alerts --- */
.alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid;
    font-size: 13px;
}

.alert-info {
    background: #d9edf7;
    border-color: #bce8f1;
    color: #1a5276;
}

.alert-danger {
    background: #f2dede;
    border-color: #ebccd1;
    color: #922b21;
}

.alert-warning {
    background: #fcf8e3;
    border-color: #faebcc;
    color: #6e5b1e;
}

.alert-success {
    background: #dff0d8;
    border-color: #d6e9c6;
    color: #1e7e34;
}

/* --- Data Tables --- */
table.grid {
    width: 100%;
    border-collapse: collapse;
}

table.grid caption {
    font-weight: 600;
    font-size: 14px;
    padding: 8px 0;
    text-align: left;
    color: #1a1a1a;
}

table.grid th {
    background: #003366;
    color: #ffffff;
    padding: 8px 10px;
    text-align: left;
    font-size: 13px;
}

table.grid td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #1a1a1a;
}

table.grid tr:hover {
    background: #f0f7ff;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
}

.badge-active {
    background: #28753a;
    color: #ffffff;
}

.badge-expired {
    background: #c0392b;
    color: #ffffff;
}

.badge-pending {
    background: #b87b0a;
    color: #ffffff;
}

/* --- Legacy Banner --- */
.legacy-banner {
    background: #fcf8e3;
    border: 1px solid #faebcc;
    color: #6e5b1e;
    padding: 8px 20px;
    font-size: 12px;
    text-align: center;
}

/* --- Stats Row --- */
.stats-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    flex: 1;
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
}

.stat-box .number {
    font-size: 28px;
    font-weight: 700;
    color: #003366;
}

.stat-box .label {
    font-size: 12px;
    color: #555555;
}

/* --- Validation Messages --- */
.field-validation-error {
    color: #922b21;
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

.validation-summary-errors {
    color: #922b21;
    font-size: 13px;
    margin-bottom: 15px;
}

.validation-summary-errors ul {
    margin: 5px 0 0 20px;
}

.input-validation-error {
    border-color: #922b21 !important;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    gap: 5px;
    margin-top: 15px;
    list-style: none;
    padding: 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #004488;
    font-size: 13px;
}

.pagination a:hover {
    background: #f0f7ff;
}

.pagination .active {
    background: #003366;
    color: #ffffff;
    border-color: #003366;
}

/* --- FAQ specific --- */
.faq-section {
    margin-bottom: 20px;
}

.faq-section details {
    border: 1px solid #ddd;
    margin-bottom: 8px;
    background: #ffffff;
}

.faq-section details summary {
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
    color: #003366;
    font-size: 14px;
}

.faq-section details summary:focus {
    outline: 2px solid #005599;
    outline-offset: -2px;
}

.faq-section details[open] summary {
    border-bottom: 1px solid #ddd;
}

.faq-section details p {
    padding: 10px 15px;
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.6;
}

/* --- Utility Classes --- */
.flex-row {
    display: flex;
    gap: 20px;
}

.flex-1 {
    flex: 1;
}

.text-center {
    text-align: center;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* --- Screen Reader Only (accessibility helper) --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Checkbox Label --- */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .stats-row,
    .flex-row {
        flex-direction: column;
    }

    .nav a {
        padding: 8px 10px;
        font-size: 12px;
    }

    .header-main h1 {
        font-size: 18px;
    }
}
