/*
 * Inc Authority styling for the Clarip cookie banner.
 *
 * Clarip's tenant config ships LegalZoom's palette (teal banner, orange
 * buttons) and appends LegalZoom's shared custom-cookie-banner-g.css at
 * runtime, after this file, with !important on link and button borders. The
 * rules here are scoped under .cc-window so they outrank both the injected
 * .cc-color-override-* palette and that stylesheet without relying on load
 * order.
 */
.cc-window.cc-banner {
    --clarip-ia-blue: #0168b0;
    --clarip-ia-blue-dark: #014a7d;
    --clarip-ia-text: #334155;

    background-color: #ffffff !important;
    color: var(--clarip-ia-text) !important;
    border-top: 3px solid var(--clarip-ia-blue);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    padding: 0.625rem max(1.5rem, env(safe-area-inset-right, 0px)) calc(0.625rem + env(safe-area-inset-bottom, 0px)) max(1.5rem, env(safe-area-inset-left, 0px));
    gap: 0.75rem 1.5rem;
    font-family: "Work Sans", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
}

.cc-window.cc-banner .cc-message {
    color: var(--clarip-ia-text) !important;
    flex: 1 1 auto;
}

.cc-window.cc-banner .cc-message a,
.cc-window.cc-banner .cc-message a.cc-link {
    color: var(--clarip-ia-blue) !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 1;
    padding: 0;
}

.cc-window.cc-banner .cc-message a:hover {
    color: var(--clarip-ia-blue-dark) !important;
}

.cc-window.cc-banner .cc-compliance {
    gap: 0.5rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.cc-window.cc-banner .cc-btn {
    font-family: "Work Sans", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    width: auto !important;
    min-width: 7.5rem;
    height: auto !important;
    min-height: 2.25rem;
    padding: 0.5rem 1.25rem !important;
    margin: 0 !important;
    border: 1px solid var(--clarip-ia-blue) !important;
    border-radius: 12px !important;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/*
 * Accept and reject carry equal weight on purpose: on the UK/EU banner the
 * reject button is .cc-dismiss ("Deny"), and regulators there expect it to be
 * as prominent as "Accept All".
 */
.cc-window.cc-banner .cc-btn.cc-allow,
.cc-window.cc-banner .cc-btn.cc-dismiss,
.cc-window.cc-banner .cc-btn.cc-deny {
    background-color: var(--clarip-ia-blue) !important;
    color: #ffffff !important;
}

.cc-window.cc-banner .cc-btn.cc-allow:hover,
.cc-window.cc-banner .cc-btn.cc-dismiss:hover,
.cc-window.cc-banner .cc-btn.cc-deny:hover {
    background-color: var(--clarip-ia-blue-dark) !important;
    border-color: var(--clarip-ia-blue-dark) !important;
}

.cc-window.cc-banner .cc-btn:focus-visible,
.cc-window.cc-banner .cc-message a:focus-visible {
    outline: 3px solid rgba(1, 104, 176, 0.4);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .cc-window.cc-banner .cc-compliance {
        width: 100%;
    }

    .cc-window.cc-banner .cc-btn {
        flex: 1 1 0;
        min-width: 0;
        min-height: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-window.cc-banner .cc-btn {
        transition: none;
    }
}

/*
 * The site's back-to-top button is fixed 16px from the bottom right and sits on
 * top of the banner's buttons. While the banner is showing, lift it clear on
 * wide screens, where the banner is a single line, and hide it on narrower ones,
 * where the banner wraps to an unpredictable height.
 */
@media (min-width: 1200px) {
    body:has(.cc-window.cc-banner.cc-bottom:not(.cc-invisible)) .btn-scroll-top {
        bottom: calc(16px + 4.5rem) !important;
    }
}

@media (max-width: 1199.98px) {
    body:has(.cc-window.cc-banner.cc-bottom:not(.cc-invisible)) .btn-scroll-top {
        visibility: hidden !important;
        pointer-events: none !important;
    }
}
