/* ============================================================
 * Prime Automation Solutions — ADA Compliance Overrides
 * Layered on top of psc.ga.gov's CSS to bring it to WCAG 2.1 AA.
 * ============================================================ */

/* --- Skip-nav link: invisible until focused --- */
a.skip-nav {
    position: absolute;
    top: -100px;
    left: 8px;
    background: #221165;
    color: #FFFFFF;
    padding: 12px 20px;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    border: 3px solid #FFFFFF;
    border-radius: 4px;
}
a.skip-nav:focus {
    top: 8px;
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

/* --- Focus indicators: visible 3px outline on every interactive element --- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid #C9A84C;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(34, 17, 101, 0.45);
}

/* --- Color contrast fixes ---
 * psc.ga.gov uses several text colors that fail WCAG 2.1 AA (4.5:1 min).
 * We darken in-place. Decorative non-text colors (gold seal, badges, brand
 * accents) keep their original hues.
 *
 * #207EBA (4.42:1) → #1668A4 (5.5:1) — body link blue
 * #58BA00 (3.6:1)  → #3A7D00 (5.0:1) — accent green (commissioner names, READ MORE buttons)
 * #C9A84C (3.0:1)  → #6B5318 (8.5:1) — gold text in chairman/profile contexts
 * #797979 (4.6:1)  → #5C5C5C (7.0:1) — light gray meta text in some footers
 */

/* Default link blue across the page (Foundation default + app.css overrides) */
a, a:visited {
    color: #1668A4;
}
a:hover, a:focus {
    color: #0F4F82;
    text-decoration: underline;
}

/* Header chairman/profile/sitemap/login gold text */
.logo-chairman a,
.header-profile a,
a.advanced-search,
.middle-links a {
    color: #6B5318 !important;
}
.logo-chairman a:hover,
.header-profile a:hover,
a.advanced-search:hover,
.middle-links a:hover {
    color: #4D3A0F !important;
    text-decoration: underline;
}

/* Header text — STATE OF GEORGIA */
.logo-text-state {
    color: #221165 !important;     /* navy = 13:1 on white, distinctive */
}
.logo-text-psc {
    color: #221165 !important;
}

/* Commissioner names (was #58BA00, now darker green for AA) */
.commisioner-cards .card-section .name,
.commissioners-home .commisioner-cards .card-section .name,
.card-section .name {
    color: #2C5F00 !important;     /* darker green; 6.5:1 on white */
}

/* Calendar day-of-week abbreviations
   Original CSS makes them low-contrast gray (~2.85:1).
   Bump to navy. Higher specificity with table.thead match. */
.rm-calendar table thead th,
.rm-calendar th.rm-sun, .rm-calendar th.rm-mon, .rm-calendar th.rm-tue,
.rm-calendar th.rm-wed, .rm-calendar th.rm-thu, .rm-calendar th.rm-fri,
.rm-calendar th.rm-sat,
table th.rm-sun, table th.rm-mon, table th.rm-tue,
table th.rm-wed, table th.rm-thu, table th.rm-fri, table th.rm-sat,
th.rm-sun, th.rm-mon, th.rm-tue, th.rm-wed, th.rm-thu, th.rm-fri, th.rm-sat,
.rm-sun, .rm-mon, .rm-tue, .rm-wed, .rm-thu, .rm-fri, .rm-sat {
    color: #221165 !important;     /* navy on white = 13:1 */
}

/* "READ MORE" buttons + info-link */
.info-link,
.info-link a,
a.read-more,
button.read-more {
    color: #1668A4 !important;
}

/* Headline title mission statement */
.headline-title p {
    color: #2c2c2c;
}

/* Foundation/app default body text */
body {
    color: #2c2c2c;
}

/* Meta text used in footers */
.meta, .small-text, .footer .meta {
    color: #5C5C5C !important;
}

/* --- Active nav item indicator (aria-current="page") --- */
nav [aria-current="page"] {
    background: rgba(201, 168, 76, 0.15);
    border-bottom: 3px solid #C9A84C;
    font-weight: bold;
}

/* --- Demo banner: subtle, accessible, dismissible-styled --- */
.pas-demo-banner {
    background: #221165;
    color: #FFFFFF;
    padding: 8px 16px;
    font-size: 0.875rem;
    text-align: center;
    border-bottom: 2px solid #C9A84C;
    line-height: 1.4;
    position: relative;
    z-index: 100;
}
.pas-demo-banner strong { color: #FFD700; }
.pas-demo-banner a {
    color: #FFD700;
    text-decoration: underline;
}
.pas-demo-banner a:hover { color: #FFFFFF; }
.pas-demo-banner .pas-scores {
    display: inline-block;
    margin-left: 16px;
    font-size: 0.8125rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 3px;
}
.pas-demo-banner .pas-scores .ok { color: #7CFC7C; font-weight: bold; }

/* --- Skeleton page body --- */
.pas-skeleton-body {
    max-width: 760px;
    margin: 3rem auto;
    padding: 2rem;
    background: #f8f7f3;
    border-left: 6px solid #C9A84C;
    border-radius: 4px;
}
.pas-skeleton-body h1 {
    color: #221165;
    margin-top: 0;
}
.pas-skeleton-body .pas-status {
    display: inline-block;
    background: #221165;
    color: #FFD700;
    padding: 4px 10px;
    font-size: 0.875rem;
    font-weight: bold;
    border-radius: 3px;
    margin-bottom: 1rem;
}

/* --- Search input placeholder contrast (axe color-contrast finding) ---
   The Docket Search input in the title bar has placeholder text that
   axe flags. Bump to a darker color. */
input[type="text"].filter,
.header-search input[type="text"],
.title-bar input[type="text"] {
    color: #221165;
}
input[type="text"].filter::placeholder,
.header-search input[type="text"]::placeholder,
.title-bar input[type="text"]::placeholder {
    color: #5C5C5C !important;
    opacity: 1;
}

/* --- Visually hidden utility (for screen-reader-only labels) --- */
.pas-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;
}

/* --- Honor user motion preference --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- High-contrast support --- */
@media (forced-colors: active) {
    a.skip-nav {
        background: Canvas;
        color: LinkText;
        border-color: LinkText;
    }
    a:focus, button:focus {
        outline-color: Highlight;
    }
}
