/* Cookie / privacy consent banner.
   Hand-written (not part of the Sass build) so it matches the compiled
   site colors in styles.scss without needing a Sass recompile:
   white #ffffff, darkGrey #181818, divBG #dcdcdc, brightGreen #008040,
   darkGreen #001a0d, gold #fdb913. */

.consent-backdrop {
    display: none;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 2000;
    justify-content: center;
    padding: 0;
    background-color: transparent;
    pointer-events: none;
}

.consent-backdrop:not([hidden]) {
    display: flex;
}

.consent-panel {
    width: 100%;
    max-width: 60rem;
    max-height: min(80vh, 34rem);
    overflow-y: auto;
    background-color: #ffffff;
    color: #181818;
    font-family: openSans, sans-serif;
    font-size: 16px;
    border-radius: .5rem .5rem 0 0;
    box-shadow: 0 -.25rem 1.5rem rgba(0, 0, 0, .3);
    padding: .9rem 1.5rem;
    pointer-events: auto;
}

.consent-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.consent-text {
    flex: 1 1 320px;
}

.consent-panel h2 {
    margin: 0 0 .15rem;
    font-size: 1rem;
}

.consent-panel p {
    margin: 0;
    line-height: 1.4;
}

#consent-desc {
    font-size: .875em;
    color: #4a4a4a;
}

#consent-desc a,
.consent-map-notice button.consent-inline-link {
    color: #008040;
    text-decoration: underline;
}

#consent-desc a:hover,
#consent-desc a:focus,
.consent-map-notice button.consent-inline-link:hover,
.consent-map-notice button.consent-inline-link:focus {
    color: #001a0d;
}

.consent-accordion {
    margin: .75rem 0 0;
    padding-top: .5rem;
    border-top: 1px solid #dcdcdc;
}

.consent-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid #dcdcdc;
}

.consent-toggle-row > div:first-child {
    flex: 1 1 auto;
}

.consent-toggle-row strong {
    display: block;
    margin-bottom: .15rem;
}

.consent-toggle-row p {
    margin: 0;
    font-size: .875em;
    color: #4a4a4a;
}

/* Switch control — ARIA role="switch" is on the button itself. */
.toggle-button {
    flex: 0 0 auto;
    position: relative;
    width: 48px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background-color: #dcdcdc;
    cursor: pointer;
}

.toggle-button span {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #ffffff;
    transition: transform .15s ease-in-out;
}

.toggle-button.active {
    background-color: #008040;
}

.toggle-button.active span {
    transform: translateX(22px);
}

.toggle-button[disabled] {
    cursor: not-allowed;
    opacity: .85;
}

.consent-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

.consent-actions button {
    font-family: openSans, sans-serif;
    font-size: .9rem;
    font-weight: 600;
    padding: .45rem .9rem;
    border-radius: .25rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
}

.btn-primary {
    background-color: #008040;
    border: 1px solid #008040;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #001a0d;
    border-color: #001a0d;
}

.btn-secondary {
    background-color: #ffffff;
    border: 1px solid #181818;
    color: #181818;
}

.btn-secondary:hover,
.btn-secondary:focus {
    color: #008040;
    border-color: #008040;
}

/* "Enable Maps" inline notice shown in place of the map until Maps is allowed. */
.consent-map-notice {
    margin: 0;
    padding: 1rem;
    background-color: #f4f4f4;
    border: 1px solid #dcdcdc;
    border-radius: .25rem;
    text-align: center;
}

.consent-map-notice button.consent-inline-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* Footer "Cookie & Privacy Settings" trigger — styled like the other footer links. */
.footer-consent-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #ffffff;
    cursor: pointer;
}

.footer-consent-link:hover,
.footer-consent-link:focus {
    color: #008040;
}

@media (max-width: 700px) {
    .consent-main {
        flex-direction: column;
        align-items: stretch;
    }

    .consent-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .consent-panel {
        padding: .9rem 1rem;
    }

    .consent-actions {
        flex-direction: column;
    }

    .consent-actions button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toggle-button span,
    .consent-actions button {
        transition: none;
    }
}
