:root {
    --mud-appbar-height: 6rem;
    --cc-blue: #293d97;
    --cc-dark-blue: #0b2244;
    --cc-nav-blue: #2c3e50;
    --cc-blue-accent-01: #172d4d;
    --cc-blue-accent-02: #364758;
    --cc-dark-grey: #555555;
    --cc-medium-grey: #cccccc;
    --cc-light-grey: #f5f5f5;
    --cc-standard-text: #333333;
    --cc-yellow-accent: #d7a31a;
    --cc-panel-background: #eef3f7;
    --cc-panel-border: #a1b0bb;
    --voter-search-focus-color: var(--cc-dark-blue);
    --voter-search-border: var(--cc-medium-grey);
    --voter-search-surface: #ffffff;
}

html,
body {
    min-height: 100%;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-background);
    font-family: Vazirmatn, "Roboto Flex", "Noto Sans", sans-serif;
    font-size: 1rem;
}

a,
.btn-link {
    color: var(--mud-palette-primary);
}

:focus-visible {
    outline: 0.1875rem solid var(--voter-search-focus-color);
    outline-offset: 0.1875rem;
}

h1:focus:not(:focus-visible) {
    outline: none;
}

/* Accessible application shell */

.voter-search-skip-link {
    position: fixed;
    top: 0;
    left: 1rem;
    z-index: 1500;
    padding: 0.75rem 1rem;
    color: var(--cc-dark-blue);
    background: #ffffff;
    border: 0.1875rem solid var(--cc-yellow-accent);
    border-top: 0;
    border-radius: 0 0 0.3125rem 0.3125rem;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-125%);
    transition: transform 120ms ease;
}

    .voter-search-skip-link:focus {
        outline: 0.1875rem solid #ffffff;
        outline-offset: 0.1875rem;
        transform: translateY(0);
    }

.voter-search-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--mud-palette-background);
}

.voter-search-layout {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.voter-search-main-content {
    flex: 1 1 auto;
}

.voter-search-content {
    min-height: 100%;
    padding: 1.75rem 2rem 2.25rem;
}

.voter-search-container {
    width: 100%;
    max-width: none;
    padding-top: 0;
    padding-bottom: 0;
}

/* Header */

.voter-search-app-bar {
    background: linear-gradient(rgb(41, 68, 97), rgb(32, 53, 70)) !important;
    border-bottom: 0.1875rem solid var(--cc-yellow-accent);
}

    .voter-search-app-bar .mud-toolbar {
        min-height: 6rem;
    }

.voter-search-app-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.voter-search-app-logo {
    box-sizing: border-box;
    display: block;
    width: 5rem;
    height: 5rem;
    flex: 0 0 5rem;
    object-fit: contain;
    background: #ffffff;
    border: 0.3125rem solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.25);
}

.voter-search-app-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.1;
}

.voter-search-app-title,
.voter-search-app-subtitle {
    color: inherit;
}

.voter-search-app-subtitle {
    opacity: 0.85;
}

/* Normal voter-search content */

.voter-search-content address {
    margin: 0;
    font-style: normal;
}

.voter-search-content dl {
    display: grid;
    grid-template-columns: minmax(13rem, 1fr) minmax(4rem, 1fr);
    margin: 0;
    border-top: 0.0625rem solid var(--voter-search-border);
}

.voter-search-content dt,
.voter-search-content dd {
    min-width: 0;
    margin: 0;
    padding: 0.625rem 0.75rem;
    border-bottom: 0.0625rem solid var(--voter-search-border);
}

.voter-search-content dt {
    background: var(--cc-light-grey);
    font-weight: 700;
}

.voter-search-content dd {
    overflow-wrap: anywhere;
    background: var(--voter-search-surface);
}

.voter-search-action-link {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding-block: 0.1875rem;
}
/* Footer */

.voter-search-footer {
    position: relative;
    z-index: 1300;
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-height: 3rem;
    padding: 0.625rem 1.5rem;
    color: #ffffff;
    background: var(--cc-dark-blue);
    border-top: 0.1875rem solid var(--cc-yellow-accent);
    box-shadow: 0 -0.125rem 0.5rem rgba(11, 34, 68, 0.18);
    font-size: 1rem;
    line-height: 1.5;
}

.voter-search-footer-separator {
    color: rgba(255, 255, 255, 0.65);
}

/* Validation and application errors */

.valid.modified:not([type="checkbox"]) {
    outline: 0.0625rem solid #267344;
}

.invalid {
    outline: 0.0625rem solid #b32121;
}

.validation-message {
    color: #b32121;
}

.blazor-error-boundary {
    padding: 1rem;
    color: #ffffff;
    background: #b32121;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

#blazor-error-ui {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1600;
    display: none;
    min-height: 3.5rem;
    padding: 1rem 4rem 1rem 1.25rem;
    color: var(--cc-dark-blue);
    background: #fff4c2;
    border-top: 0.1875rem solid var(--cc-yellow-accent);
    box-shadow: 0 -0.125rem 0.5rem rgba(11, 34, 68, 0.18);
}

    #blazor-error-ui .reload {
        margin-left: 0.5rem;
        color: var(--cc-dark-blue);
        font-weight: 700;
    }

    #blazor-error-ui .dismiss {
        position: absolute;
        top: 50%;
        right: 0.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.75rem;
        min-height: 2.75rem;
        padding: 0;
        color: var(--cc-dark-blue);
        background: transparent;
        border: 0;
        border-radius: 0.3125rem;
        font: inherit;
        font-size: 1.5rem;
        cursor: pointer;
        transform: translateY(-50%);
    }

/*
 * Voter registration card
 *
 * This fixed-size rendering represents the physical voter-registration
 * certificate. It is intentionally kept separate from normal responsive
 * application content.
 */

.card {
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 6in;
    height: 4.25in;
    padding: 10px;
    color: #000000;
    border: 1px solid #000000;
    line-height: 5pt;
}

.card-body {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
}

.half-card {
    width: 50%;
}

.left-side {
    border-right: 1px solid #000000;
}

.card-header {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    min-height: 23px;
    font-family: Arial, sans-serif;
    font-size: 5pt;
}

.seal {
    width: 30px;
    margin: 10px;
    border-width: 0;
}

.title-area {
    line-height: 18px;
    text-align: center;
    vertical-align: top;
}

.registration-details {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
}

.district-details {
    padding: 0 10px;
    text-align: center;
}

.box {
    display: block;
    padding-top: 3px;
    overflow: hidden;
    font-family: Arial, sans-serif;
    font-size: 5pt;
    line-height: 6pt;
    border: 1px solid #000000;
}

.validfrom-box {
    border-bottom: unset;
}

.validto-box {
    border-top: unset;
}

.box-title {
    font-weight: bold;
}

.box-subtitle {
    margin-left: 3px;
}

.box-value {
    padding-top: 5px;
    font-family: monospace;
    font-size: 8pt;
    font-weight: bold;
}

.perm-address-area {
    padding-bottom: 5px;
    font-family: Arial, sans-serif;
    font-size: 5pt;
    line-height: 6pt;
}

.address-block {
    margin: 5px 0;
}

.address-spacing {
    line-height: 11pt;
}

.signature-area {
    margin: 5px 0;
    font-family: Arial, sans-serif;
    font-size: 4pt;
    line-height: 6pt;
}

.sign-block {
    width: 95%;
    font-size: large;
    font-weight: bolder;
    line-height: 16pt;
    border-bottom: 2px solid #000000;
}

.keep-format {
    white-space: pre-wrap;
}

.cert-area {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    padding: 3px 0 3px 10px;
    font-family: Arial, sans-serif;
    font-size: 5pt;
    line-height: 6pt;
}

.cert-title {
    width: 195px;
    font-weight: bold;
}

.cert-value {
    font-family: monospace;
    font-size: 7pt;
    font-weight: bold;
}

.cardbase {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    height: 96px;
    font-family: Arial, sans-serif;
    font-size: 5pt;
    line-height: 6pt;
    border-bottom: 1px dashed #000000;
}

    .cardbase > .cardbaseblock {
        white-space: pre-wrap;
    }

.mail-address-area {
    padding-left: 10px;
    font-family: Arial, sans-serif;
    font-size: 5pt;
    line-height: 6pt;
}

.mail-address-title {
    margin-bottom: 32px;
}

.voter {
    font-family: monospace;
    font-size: 8pt;
    font-weight: bold;
    line-height: 10pt;
    text-align: left;
}

.registrationlabel {
    font-family: Arial, sans-serif;
    font-size: 5pt;
    text-align: left;
    vertical-align: top;
}

.districtcell {
    width: 45px;
    vertical-align: top;
}

.t {
    border-top: 1px solid #000000;
}

.r {
    border-right: 1px solid #000000;
}

.l {
    border-left: 1px solid #000000;
}

.b {
    border-bottom: 1px solid #000000;
}

.districtlabel {
    font-family: Arial, sans-serif;
    font-size: 5pt;
    text-align: center;
    vertical-align: top;
}

.district {
    padding-bottom: 3px;
    font-family: monospace;
    font-size: 8pt;
    font-weight: bold;
    vertical-align: bottom;
}

.signhere {
    font-family: Arial, sans-serif;
    font-size: large;
    font-weight: bold;
    border-bottom: 1px solid #000000;
}

.disclaimer {
    font-family: Arial, sans-serif;
    font-size: 4pt;
}

.yearColor {
    background-color: #fefeaa;
}

a.disturl,
a:link.disturl,
a:visited.disturl,
a:active.disturl,
a:hover.disturl {
    font-family: monospace;
    font-size: 8pt;
    font-weight: bold;
}

/* Status and error pages */

.voter-search-status-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    max-width: 42rem;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--voter-search-surface);
    border: 0.0625rem solid var(--voter-search-border);
}

/* Fixed-size voter-card comparison */

.voter-card-scroll-container {
    max-width: 100%;
    padding: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
}

.voter-search-link-list {
    margin: 0;
    padding-left: 1.5rem;
}

    .voter-search-link-list li + li {
        margin-top: 0.5rem;
    }

@media (prefers-reduced-motion: reduce) {
    .voter-search-skip-link {
        transition: none;
    }
}

@media (max-width: 37.5rem) {
    .voter-search-content {
        padding: 1.25rem 1rem 2rem;
    }

    .voter-search-app-subtitle {
        display: none;
    }

    .voter-search-footer {
        padding-inline: 1rem;
    }

    .voter-search-content dl {
        grid-template-columns: minmax(0, 1fr);
    }

    .voter-search-content dt {
        padding-bottom: 0.25rem;
        border-bottom: 0;
    }

    .voter-search-content dd {
        padding-top: 0.25rem;
    }
}
