/*
 * Hagzi cookie consent banner (see hagzi-consent.js).
 * Fixed overlay, never in flow: showing or hiding it causes no layout shift.
 * On mobile it sits above the fixed .hz-mobile-nav (property-mobile-navigation.css).
 */

.hz-consent {
    position: fixed;
    inset-inline: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    z-index: 60;
    max-width: 720px;
    max-height: 70vh;
    overflow-y: auto;
    margin-inline: auto;
    padding: 18px 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    font-size: 14px;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.hz-consent.is-open {
    opacity: 1;
    transform: none;
}

.hz-consent__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.hz-consent__text {
    margin: 0;
}

.hz-consent__link {
    color: var(--hagzi-primary, #0745D9);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hz-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* Both choices share one style: equal visual weight, as consent guidance requires. */
.hz-consent__btn {
    flex: 1 1 0;
    min-width: 140px;
    min-height: 44px;
    padding: 10px 16px;
    border: 2px solid var(--hagzi-primary, #0745D9);
    border-radius: 10px;
    background: var(--hagzi-primary, #0745D9);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.hz-consent__btn:hover {
    background: var(--hagzi-primary-dark, #0638B0);
    border-color: var(--hagzi-primary-dark, #0638B0);
}

.hz-consent__btn:focus-visible,
.hz-consent__link:focus-visible,
.hzf__consent:focus-visible {
    outline: 3px solid var(--hagzi-primary, #0745D9);
    outline-offset: 3px;
    border-radius: 6px;
}

.hz-consent__btn:focus-visible {
    border-radius: 10px;
}

/* Footer "Cookie settings": a button that looks like its sibling legal links. */
.hzf__consent {
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

/* Useless without the script; hidden without reflow until it has loaded. */
html:not(.hz-consent-ready) [data-hz-consent-open] {
    visibility: hidden;
}

@media (max-width: 767.98px) {
    .hz-consent {
        inset-inline: 10px;
        bottom: max(10px, env(safe-area-inset-bottom, 0px));
        padding: 14px 16px;
        font-size: 13.5px;
    }

    /* The mobile nav is ~70px tall at bottom: max(10px, safe-area). */
    .hz-consent--above-nav {
        bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    }

    .hz-consent__btn {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hz-consent {
        transition: none;
        transform: none;
    }
}

@media print {
    .hz-consent {
        display: none !important;
    }
}
