/* Self-hosted cookie-consent banner — replaces Cookiebot's UI.
   Accent colour comes from --bfg-accent (set inline per brand on #bfg-consent). */

.bfg-consent {
    --bfg-accent: #0e5c63;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 2147483000;           /* above modals/backdrops, below nothing we own */
    display: flex;
    justify-content: center;
    padding: 16px;
    pointer-events: none;          /* let the panel itself catch clicks */
    font-family: inherit;
}
.bfg-consent[hidden] { display: none; }

/* shared panel look */
.bfg-consent__banner,
.bfg-consent__prefs {
    pointer-events: auto;
    width: 100%;
    max-width: 720px;
    background: #fff;
    color: #1c2b2e;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(11, 44, 86, .28), 0 2px 8px rgba(11, 44, 86, .12);
    padding: 22px 24px;
    animation: bfg-rise .32s cubic-bezier(.2, .7, .3, 1) both;
}

@keyframes bfg-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .bfg-consent__banner, .bfg-consent__prefs { animation: none; }
}

.bfg-consent__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #142b2e;
}
.bfg-consent__text {
    font-size: .9rem;
    line-height: 1.55;
    margin: 0;
    color: #40525a;
}
.bfg-consent__link,
.bfg-consent__text a {
    color: var(--bfg-accent);
    font-weight: 600;
    text-decoration: underline;
}

/* actions — reject/customize/accept share equal visual weight (Garante rule:
   reject must be as easy as accept). Only the fill differs. */
.bfg-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    justify-content: flex-end;
}
.bfg-consent__btn {
    appearance: none;
    border: 1.5px solid var(--bfg-accent);
    border-radius: 10px;
    padding: .62rem 1.15rem;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
    line-height: 1;
}
.bfg-consent__btn:hover  { transform: translateY(-1px); }
.bfg-consent__btn:active { transform: translateY(0); }
.bfg-consent__btn--primary {
    background: var(--bfg-accent);
    color: #fff;
    box-shadow: 0 8px 20px -8px var(--bfg-accent);
}
.bfg-consent__btn--ghost {
    background: transparent;
    color: var(--bfg-accent);
}
.bfg-consent__btn--ghost:hover {
    background: color-mix(in srgb, var(--bfg-accent) 8%, transparent);
}

/* preferences */
.bfg-consent__prefs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.bfg-consent__close {
    background: none;
    border: 0;
    font-size: 1.6rem;
    line-height: 1;
    color: #8a979b;
    cursor: pointer;
    padding: 0 4px;
}
.bfg-consent__close:hover { color: #40525a; }

.bfg-consent__cat {
    border: 1px solid #e6ebe9;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.bfg-consent__cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.bfg-consent__cat-name { font-weight: 700; font-size: .95rem; }
.bfg-consent__cat-desc {
    margin: 6px 0 0;
    font-size: .82rem;
    line-height: 1.5;
    color: #5c6b70;
}

/* toggle switch */
.bfg-consent__switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
}
.bfg-consent__switch input { opacity: 0; width: 0; height: 0; }
.bfg-consent__slider {
    position: absolute;
    inset: 0;
    background: #c6cdcb;
    border-radius: 999px;
    transition: background .2s ease;
}
.bfg-consent__slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.bfg-consent__switch input:checked + .bfg-consent__slider { background: var(--bfg-accent); }
.bfg-consent__switch input:checked + .bfg-consent__slider::before { transform: translateX(18px); }
.bfg-consent__switch--locked .bfg-consent__slider { opacity: .65; }

@media (max-width: 560px) {
    .bfg-consent { padding: 10px; }
    .bfg-consent__banner, .bfg-consent__prefs { padding: 18px 18px; border-radius: 14px; }
    .bfg-consent__actions { justify-content: stretch; }
    .bfg-consent__actions .bfg-consent__btn { flex: 1 1 auto; text-align: center; }
}
