/*
 * Cookie consent banner for the Alliance PH Application Measurement plugin (the JS builds the markup).
 * Navy #1F2A6B on white is 13.1:1; white on the hover blue #1E6EBB is 5.25:1.
 */

.ags-consent {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1030; /* under the mobile menu (1040 and up) and the pop-ups (1200 and up) */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 24px;
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    background-color: #ffffff;
    color: #1F2A6B;
    border-top: 1px solid #E5E7EB;
    box-shadow: 0 -4px 16px rgba(17, 17, 17, 0.12);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.ags-consent[hidden] {
    display: none;
}

.ags-consent,
.ags-consent * {
    box-sizing: border-box;
}

.ags-consent:focus {
    outline: none;
}

.ags-consent:focus-visible {
    outline: 3px solid #1F2A6B;
    outline-offset: -3px;
}

.ags-consent__text {
    flex: 1 1 20rem;
    max-width: 60rem;
    margin: 0;
    color: #1F2A6B;
}

.ags-consent__text a,
.ags-consent__text a:hover,
.ags-consent__text a:focus-visible {
    color: #1F2A6B;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ags-consent__text a:hover {
    text-decoration-thickness: 2px;
}

.ags-consent__actions {
    display: flex;
    gap: 12px;
}

.ags-consent__button {
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 10px 24px;
    border: 2px solid #1F2A6B;
    border-radius: 4px;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.ags-consent__button--secondary {
    background-color: #ffffff;
    color: #1F2A6B;
}

.ags-consent__button--secondary:hover {
    background-color: #1F2A6B;
    color: #ffffff;
}

.ags-consent__button--primary {
    background-color: #1F2A6B;
    color: #ffffff;
}

.ags-consent__button--primary:hover {
    background-color: #1E6EBB;
    border-color: #1E6EBB;
}

.ags-consent__text a:focus-visible,
.ags-consent__button:focus-visible {
    outline: 3px solid #1F2A6B;
    outline-offset: 2px;
}

/* Room for the banner while it shows (the JS sets the height). */
html.ags-consent-open {
    scroll-padding-bottom: var(--ags-consent-height, 0px);
}

html.ags-consent-open body {
    padding-bottom: var(--ags-consent-height, 0px);
}

@media (max-width: 640px) {
    .ags-consent {
        font-size: 0.875rem;
    }

    .ags-consent__actions {
        flex: 1 1 100%;
    }

    .ags-consent__button {
        flex: 1 1 0;
    }
}

@keyframes ags-consent-in {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
    .ags-consent {
        animation: ags-consent-in 0.25s ease-out;
    }
}
