/* Custom cookie-consent UI — matches the site design tokens. */
.cc[hidden] { display: none; }

.cc__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 29, 27, 0.55);
    z-index: 9998;
}
.cc__backdrop[hidden] { display: none; }

.cc__banner,
.cc__prefs {
    position: fixed;
    z-index: 9999;
    background: var(--brand-light, #f3f3f3);
    color: var(--brand-dark, #1E1D1B);
    font-family: var(--font-text, "Inter", sans-serif);
    border: 1px solid rgba(30, 29, 27, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(30, 29, 27, 0.28);
    box-sizing: border-box;
}
.cc__banner[hidden],
.cc__prefs[hidden] { display: none; }

/* Docked banner — bottom-left card */
.cc__banner {
    left: 1.5rem;
    bottom: 1.5rem;
    width: min(420px, calc(100vw - 3rem));
    padding: 1.25rem 1.35rem 1.15rem;
}

/* Centered preferences modal */
.cc__prefs {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 2.5rem));
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding: 1.6rem 1.6rem 1.4rem;
}

.cc__title {
    font-family: var(--font-title, "Playfair Display", serif);
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}
.cc__text,
.cc__cat-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    color: rgba(30, 29, 27, 0.82);
}
.cc__link {
    color: var(--brand-dark, #1E1D1B);
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

/* Match the site button system: a bordered pill (.hero-button-inner) holding a
   dark filled primary (.cta-button.send-email) and borderless secondaries
   (.cta-button.call-now). Dark button = Accept. */
.cc__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    margin-top: 1.25rem;
    padding: 0.2rem;
    border: 1px solid var(--brand-dark, #1E1D1B);
    border-radius: 1.5rem;
}
.cc__btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.2rem;
    border: 1px solid transparent;
    border-radius: 1.3rem;
    background: transparent;
    color: var(--brand-dark, #1E1D1B);
    font-family: var(--font-text, "Inter", sans-serif);
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.18s ease;
}
.cc__btn:hover { opacity: 0.75; }

/* Dark primary = Accept — mirrors .cta-button.send-email */
.cc__btn--solid {
    background-color: var(--brand-dark, #1E1D1B);
    background-image: var(--surface-dark-overlay-control);
    color: var(--brand-light, #f3f3f3);
    border-color: var(--brand-dark, #1E1D1B);
    flex: 2 1 0;
}
.cc__btn--solid:hover { opacity: 0.8; }

/* Secondary actions — mirror .cta-button.call-now (borderless) */
.cc__btn--ghost {
    background: none;
    border-color: transparent;
    color: var(--brand-dark, #1E1D1B);
}

/* "Reject non-essential" sits above the pill, outside it, right-aligned as a
   de-emphasised text link. */
.cc__reject-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    margin: 1.1rem auto 0;
    padding: 0 0.5rem;
    background: none;
    border: none;
    color: var(--brand-dark, #1E1D1B);
    font-family: var(--font-text, "Inter", sans-serif);
    font-size: 0.95rem;
    cursor: pointer;
}
.cc__reject-top:hover { opacity: 0.75; }
.cc__reject-top + .cc__actions { margin-top: 0.5rem; }

/* Preference categories */
.cc__cat {
    display: block;
    padding: 0.9rem 0;
    border-top: 1px solid rgba(30, 29, 27, 0.12);
}
.cc__cat--toggle { cursor: pointer; }
.cc__cat-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}
.cc__cat-name { font-weight: 600; font-size: 0.95rem; }
.cc__always {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-accent, #B49E6E);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Toggle switch */
.cc__toggle {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.cc__switch {
    margin-left: auto;
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(30, 29, 27, 0.25);
    transition: background-color 0.18s ease;
}
.cc__switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s ease;
}
.cc__toggle:checked ~ .cc__switch { background: var(--brand-success, #2F6B47); }
.cc__toggle:checked ~ .cc__switch::after { transform: translateX(20px); }
.cc__toggle:focus-visible ~ .cc__switch {
    outline: 2px solid var(--brand-accent, #B49E6E);
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .cc__banner {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        width: auto;
    }
}
