/* SOS Rules Waiver — Orchard Design System */
/* Color tokens: Augusta Greenway palette adapted for Secretary of State */

/* --- Local Fonts --- */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/montserrat-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/source-serif-4-latin.woff2') format('woff2');
}

:root {
    --color-heading: #031018;
    --color-body: #38424b;
    --color-link: #12443b;
    --color-link-hover: #863213;
    --color-link-active: #B01116;
    --color-error: #B01116;
    --color-warning: #D13C05;
    --color-success: #12443b;
    --bg-accent: #e2eae4;
    --bg-light: #e8e6e2;
    --bg-page: #e8e6e2;
    --bg-dark: #192934;
    --bg-white: #fff;
    --border-light: #d5d5d5;
    --border-accent: #8fb3a3;
    --sos-gold: #dfae14;
}

* { font-family: "Montserrat", "Open Sans", Corbel, Arial, sans-serif; box-sizing: border-box; }
body {
    background-color: var(--bg-page);
    font-size: clamp(0.9375rem, 4vw, 1rem);
    letter-spacing: .02em;
    line-height: 1.6;
    color: var(--color-body);
}
h1,h2,h3,h4,h5,h6 {
    font-family: "Source Serif 4", "Source Serif Pro VF", Georgia, "Times New Roman", serif;
    font-weight: 700;
    color: var(--color-heading);
}
a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* --- Orchard Header --- */
.header-top-hat { background-color: var(--bg-dark); }
.header-top-hat__inner {
    padding: clamp(0.25rem,1vw,0.75rem) clamp(1rem,3vw,2rem);
    display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
}
.header-official-site__description-text {
    margin: 0; color: hsla(0,0%,100%,0.8);
    font-size: clamp(0.6875rem,2.5vw,0.875rem); font-weight: 600;
}
.header-official-site__toggle {
    background: none; border: none; color: #fff; font-size: inherit;
    font-weight: 600; font-family: inherit; cursor: pointer; padding: 0;
    padding-inline-end: 1.625rem; margin-left: 0.625rem;
    text-decoration: none; position: relative; line-height: 1; letter-spacing: .02em;
}
.header-official-site__toggle:hover { text-decoration: underline; }
.header-official-site__toggle::after {
    content: ""; position: absolute; inset-block-end: 0; inset-inline-end: 0;
    inline-size: 0.625rem; block-size: 0.625rem;
    transform: translate(-50%,-50%) rotate(45deg);
    border-inline-end: solid 0.125rem #fff; border-block-end: solid 0.125rem #fff;
    background: transparent; transition: transform .3s ease;
}
.header-official-site__toggle[aria-expanded="true"]::after {
    transform: translate(-50%,-50%) rotate(225deg); inset-block-end: -0.375rem;
}
.header-official-site__information-wrapper[hidden] { display: none; }
.header-official-site__information-wrapper {
    background: #031018; padding: 1rem clamp(1rem,3vw,2rem);
    display: grid; grid-template-columns: 1fr 1fr; grid-column-gap: 2rem; align-items: baseline;
}
.header-official-site__information-callout { color: #fff; font-weight: 700; margin: 0 0 0.25rem; }
.header-official-site__information-description { color: hsla(0,0%,100%,0.8); margin: 0; font-size: 0.875rem; line-height: 1.5; }
.header-official-site__information-description a { color: #fff; }

.header-branding-bar { background-color: var(--bg-white); border-bottom: 0.0625rem solid #e6e6e6; }
.header-branding-bar__inner { padding: clamp(0.5rem,1.5vw,1rem) clamp(1rem,3vw,2rem); display: flex; align-items: center; justify-content: space-between; }
.header-branding-lockup__link {
    display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
}
.header-branding-lockup__link:hover { text-decoration: underline; }
.header-branding-lockup__logo { line-height: 0; }
.header-branding-lockup__logo img { height: clamp(2.125rem,6vw,4.5rem); }
.header-branding-lockup__agency-name {
    font-family: "Source Serif 4", Georgia, serif; font-weight: 700;
    font-size: clamp(1rem,2.5vw,1.25rem); color: var(--color-heading);
}
@media (min-width: 48em) {
    .header-branding-lockup__logo { border-inline-end: 0.0625rem solid #efeadb; padding-inline-end: 1rem; }
    .header-branding-lockup__link { gap: 1rem; }
}

.header-breadcrumb {
    padding: 0.625rem clamp(1rem,3vw,2rem);
    font-family: "Montserrat", "Open Sans", Arial, sans-serif;
    font-size: 0.875rem; font-weight: 600; color: var(--color-body);
    background-color: #f4f3f0;
    border-bottom: 0.0625rem solid var(--border-light);
    display: flex; align-items: center; gap: 0.25rem;
}
.header-breadcrumb a { color: var(--color-link); text-decoration: none; }
.header-breadcrumb a:hover { color: var(--color-link-hover); text-decoration: underline; }
.header-breadcrumb__right { margin-left: auto; }
.header-breadcrumb__right a { color: var(--color-link); }

/* --- Page Container --- */
main.container {
    max-width: 960px;
    background-color: var(--bg-white);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    min-height: 50vh;
}

/* --- SOS App Overrides --- */
.form-section .form-group.row > .col-form-label {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}
.form-section .form-group.row > div:not(:first-child):not(.col-sm-2) {
    flex: 0 0 60%;
    max-width: 60%;
}
/* Search form: shrink input column when a button column is present */
.form-section .form-group.row:has(> .col-sm-2) > div:not(:first-child):not(.col-sm-2) {
    flex: 0 0 50%;
    max-width: 50%;
}
.form-section { margin-bottom: 1.5rem; }
.form-section legend, .form-section caption {
    font-weight: 600; font-size: 1.1rem;
    border-bottom: 3px solid var(--border-accent); padding-bottom: .25rem; margin-bottom: .75rem;
}
.error-block { background: #fce4e4; border: 1px solid var(--color-error); padding: 1rem; margin-bottom: 1rem; border-radius: .25rem; }
.error-block p { margin-bottom: .25rem; }
.alert-copy { color: var(--color-success); font-weight: 600; }
.btn-gov { background-color: #065389; color: #fff; border: none; }
.btn-gov:hover { background-color: #064371; color: #fff; }
.results-table th { background-color: var(--bg-accent); color: var(--color-heading); }
.pagebanner { font-size: 0.9rem; margin-bottom: 0.25rem; }
.pagelinks { font-size: 0.9rem; margin-bottom: 0.5rem; }
.pagelinks a { margin: 0 0.15rem; }

@media (max-width: 768px) {
    .header-official-site__information-wrapper { grid-template-columns: 1fr; }
    .header-breadcrumb { flex-wrap: wrap; gap: 0.25rem; }
}
