﻿/* Hover to open dropdown */
.hover-dropdown:hover .dropdown-menu {
    display: block;
}

/* Make menu wide */
.mega-box {
    width: 500px;
    min-width: 0;
    max-width: calc(100vw - 16px);
    padding: 15px;
    box-sizing: border-box;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}

.mega-box > .row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
}

.mega-box > .row > h6,
.mega-box > .row > .col-sm-12,
.mega-box > .row > .reset-item {
    grid-column: 1 / -1;
}

.mega-box > .row > [class*="col-"] {
    float: none;
    width: auto;
    padding: 0 2px;
}

.mega-box h6 {
    font-weight: 700;
    margin: 0 0 5px;
}

.mega-box .section-heading {
    margin: 15px 0 5px;
}

.dropdown-menu {
    background: #fff !important;
}

.box-item {
    width: auto;
    text-align: center;
    margin: 0 0 5px;
    padding: 0 2px;
}

.box-item button {
    display: block;
    text-align: center;
    width: 100%;
    min-height: 70px;
    margin: 0px;
    border-radius: 5px;
    transition: all 0.3s linear 0s;
    text-align: center;
    background: transparent;
    font-size: 14px !important;

}

img.mainicon {
    width: 28px;
    height: 28px;
    fill: #000;
    filter: brightness(0) invert(1);
}

.box-item button img {
    width: 28px;
    height: 28px;
    fill: #000;
}

.box-item button .tool-symbol {
    display: block;
    height: 28px;
    font-size: 24px;
    line-height: 28px;
}

.mega-box .reset-item {
    margin-top: 5px;
}

.mega-box #resetAccessibility {
    width: 100%;
    min-height: 44px;
    border: 1px solid #777;
    border-radius: 4px;
    background: #f5f5f5;
    color: #222;
    font-weight: 600;
}

.mega-box #resetAccessibility:hover {
    background: #e8e8e8;
}

.mega-box #resetAccessibility:focus-visible {
    outline: 3px solid #1769aa;
    outline-offset: 2px;
}


.box-item button:hover {
    background: #eeecf9;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 0px 1px;
}

.box-item button span {
    display: block;
    text-align: center;

}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: .255em;
    vertical-align: .255em;
    content: "";
    border-top: 0em solid !important;
    border-right: 0em solid transparent !important;
    border-bottom: 0rem !important;
    border-left: 0em solid transparent !important;
}

#dropdownMenuBtn:focus,
#dropdownMenuBtn:focus-visible,
.box-item button:focus,
.box-item button:focus-visible,
a:focus-visible {
    outline: 3px solid #1769aa !important;
    outline-offset: 2px;
}

/* High contrast: apply the palette across the complete page, including controls. */
body.high-contrast,
body.high-contrast * {
    color: #fff !important;
    background-color: #000 !important;
    border-color: #ff0 !important;
    box-shadow: none !important;
}

body.high-contrast a,
body.high-contrast a *,
body.high-contrast a:visited,
body.high-contrast a:visited * {
    color: #ff0 !important;
    text-decoration: underline !important;
}

body.high-contrast a:focus-visible,
body.high-contrast button:focus-visible,
body.high-contrast input:focus-visible,
body.high-contrast select:focus-visible,
body.high-contrast textarea:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
}

body.high-contrast img {
    filter: none !important;
}
/* Highlight Links */
.highlight-links a, .highlight-links .footerfirst a {
    background: #000 !important;
    color: yellow !important;
    padding: 2px 4px;
    border-radius: 3px;
    text-decoration: underline !important;
}

.highlight-links a img {
    /* filter: brightness(0.6) contrast(1.2) !important; */
    background: yellow;
    box-shadow: 0 0 0px 4px #000;
}
.highlight-links .state-name, .highlight-links .state-sub{
    background: #000 !important;
    color: yellow !important;
}
/* Invert page colors while preserving hue; combine saturation when both are selected. */
.invert-mode {
    filter: invert(1) hue-rotate(180deg);
}

.invert-mode.saturation-mode {
    filter: invert(1) hue-rotate(180deg) saturate(3);
}
/* High Saturation */
.saturation-mode {
    filter: saturate(3);
}

/* Font controls */
body {
    transition: color 0.2s ease, background-color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
    body {
        transition: none;
    }
}

.text-spacing,
.text-spacing * {
    letter-spacing: 2px !important;
    word-spacing: 4px !important;
}

.line-height-mode, .line-height-mode * {
    line-height: 2 !important;
}

/* Hide Images */
.hide-images img {
    display: none !important;
}

.hide-images .box-item img,
.hide-images .dropdown-toggle img {
    display: initial !important;
}

.big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='white' stroke='black'%3E%3Cpath d='M3 2 L3 22 L8 17 L12 24 L14 23 L10 16 L17 16 Z' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 2 2, auto !important;
}

.toggle-active {
    position: relative;
    border: 1px solid #28a745 !important;
    background: #efefef !important;
}

.toggle-active::after {

    font-family: FontAwesome;
    color: #fff;
    font-size: 9px;
    background: green;
    letter-spacing: 0;
    content: "\f00c";
    position: absolute;
    right: -5px;
    top: 1%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

@media (max-width: 380px) {
    .mega-box > .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Public page search results */
.public-search-host {
    position: relative;
}

.public-search-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 1080;
    width: min(500px, calc(100vw - 2rem));
    max-height: min(70vh, 32rem);
    overflow-y: auto;
    padding: 0.75rem;
    color: #212529;
    background: #fff;
    border: 1px solid #adb5bd;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 18%);
}

.public-search-results[hidden] {
    display: none;
}

.public-search-heading {
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.public-search-list {
    display: grid;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.public-search-list a {
    display: block;
    padding: 0.55rem;
    color: #12366b;
    border-radius: 0.25rem;
    text-decoration: none;
}

.public-search-list a:hover,
.public-search-list a:focus-visible {
    color: #102a43;
    background: #e8f1ff;
    outline: 2px solid #1769aa;
    outline-offset: 1px;
}

.public-search-list a strong,
.public-search-list a span {
    display: block;
}

.public-search-list a span {
    margin-top: 0.15rem;
    color: #495057;
    font-size: 0.9em;
}

body.high-contrast .public-search-results,
body.high-contrast .public-search-results * {
    color: #fff !important;
    background-color: #000 !important;
}

body.high-contrast .public-search-list a:focus-visible {
    outline-color: #ff0 !important;
}


/* Search results page */
.search-results-page {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.search-results-title {
    margin: 0 0 1.25rem;
    color: #172b4d;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 400;
    overflow-wrap: anywhere;
}

.search-results-searchbox {
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #e5e5e5;
}

.search-results-form {
    display: flex;
    width: min(100%, 620px);
}

.search-results-form input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 46px;
    padding: 0.6rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 1.5rem 0 0 1.5rem;
    background: #fff;
}

.search-results-form button {
    min-width: 100px;
    padding: 0.6rem 1.25rem;
    border: 0;
    border-radius: 0 1.5rem 1.5rem 0;
    color: #fff;
    background: #18356b;
}

.search-results-status {
    margin: 0 0 1rem;
}

.search-result-card {
    margin-bottom: 1rem;
}

.search-result-card h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 2.3vw, 1.8rem);
    font-weight: 400;
    overflow-wrap: anywhere;
}

.search-result-title,
.search-result-readmore {
    color: #0879e8;
    text-decoration: none;
}

.search-result-title:hover,
.search-result-readmore:hover {
    text-decoration: underline;
}

.search-result-breadcrumb {
    margin: 0 0 0.5rem 0.75rem;
    color: #495057;
}

.search-result-excerpt {
    margin: 0 0 0.5rem;
    overflow-wrap: anywhere;
}

.search-result-readmore {
    display: inline-block;
    margin-top: 0.1rem;
}

.search-results-page :focus-visible {
    outline: 3px solid #1769aa;
    outline-offset: 2px;
}

body.high-contrast .search-results-title,
body.high-contrast .search-result-title,
body.high-contrast .search-result-readmore {
    color: #ff0 !important;
}

body.high-contrast .search-results-searchbox {
    background: #000 !important;
    border: 1px solid #ff0;
}

body.high-contrast .search-results-form button {
    color: #fff !important;
    background: #000 !important;
    border: 1px solid #ff0;
}

@media (max-width: 575.98px) {
    .search-results-searchbox {
        padding: 1rem 0.75rem;
    }

    .search-results-form button {
        min-width: 82px;
        padding-inline: 0.8rem;
    }
}
