:root {
    /* Token visivi allineati al banner Hybrid del playground; la logica JS resta separata. */
    --bp-cookiebot-bottom-offset: 0px;
    --bp-cookiebot-surface: #3269d4;
    --bp-cookiebot-surface-strong: #2c63ce;
    --bp-cookiebot-surface-deep: #2458be;
    --bp-cookiebot-ink: #ffffff;
    --bp-cookiebot-soft: rgba(255, 255, 255, 0.92);
    --bp-cookiebot-soft-muted: rgba(255, 255, 255, 0.78);
    --bp-cookiebot-line: rgba(255, 255, 255, 0.14);
    --bp-cookiebot-panel: rgba(255, 255, 255, 0.12);
    --bp-cookiebot-panel-strong: rgba(255, 255, 255, 0.18);
    --bp-cookiebot-accent: #12144b;
    --bp-cookiebot-accent-strong: #18204c;
    --bp-cookiebot-shadow: 0 28px 70px rgba(10, 18, 68, 0.28);
}

.bp-cookiebot,
.bp-cookiebot-trigger {
    font-family: "Lexend", "Segoe UI", sans-serif;
}

.bp-cookiebot {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: calc(20px + var(--bp-cookiebot-bottom-offset));
    z-index: 9998;
    width: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(36px);
    transition: opacity 180ms ease, transform 240ms ease, visibility 0s linear 240ms;
}

.bp-cookiebot.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.bp-cookiebot__surface {
    max-width: 1160px;
    margin: 0 auto;
    padding: 26px 28px;
    border: 1px solid var(--bp-cookiebot-line);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--bp-cookiebot-surface) 0%, var(--bp-cookiebot-surface-strong) 52%, var(--bp-cookiebot-surface-deep) 100%);
    color: var(--bp-cookiebot-ink);
    box-shadow: var(--bp-cookiebot-shadow);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "eyebrow actions"
        "title actions"
        "body actions"
        "details details";
    gap: 14px 28px;
    align-items: end;
}

.bp-cookiebot__eyebrow {
    grid-area: eyebrow;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.bp-cookiebot__eyebrow::before {
    content: "\1F36A";
    font-size: 1.1rem;
    line-height: 1;
}

.bp-cookiebot__title {
    grid-area: title;
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    color: #fff;
}

.bp-cookiebot__body {
    grid-area: body;
    margin: 0;
    max-width: 780px;
    color: var(--bp-cookiebot-soft);
    line-height: 1.68;
}

.bp-cookiebot__link {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.bp-cookiebot__actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 236px;
}

.bp-cookiebot__details-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bp-cookiebot__button {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 15px 24px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.bp-cookiebot__button:hover {
    transform: translateY(-1px);
}

.bp-cookiebot button.bp-cookiebot__button--primary,
.bp-cookiebot [type="button"].bp-cookiebot__button--primary {
    background-color: var(--bp-cookiebot-accent);
    background-image: none;
    border-color: var(--bp-cookiebot-accent);
    color: #fff;
    box-shadow: 0 12px 30px rgba(9, 15, 56, 0.24);
}

.bp-cookiebot button.bp-cookiebot__button--secondary,
.bp-cookiebot [type="button"].bp-cookiebot__button--secondary {
    background-color: #fff;
    background-image: none;
    border-color: rgba(18, 20, 75, 0.12);
    color: var(--bp-cookiebot-accent-strong);
}

.bp-cookiebot button.bp-cookiebot__button--ghost,
.bp-cookiebot [type="button"].bp-cookiebot__button--ghost {
    background-color: rgba(255, 255, 255, 0.12);
    background-image: none;
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.bp-cookiebot__details {
    grid-area: details;
    margin-top: 8px;
}

.bp-cookiebot__details-copy {
    margin: 0 0 14px;
    color: var(--bp-cookiebot-soft);
    line-height: 1.6;
    font-size: 0.92rem;
}

.bp-cookiebot__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bp-cookiebot__card {
    display: block;
    padding: 16px;
    border: 1px solid var(--bp-cookiebot-line);
    border-radius: 14px;
    background: var(--bp-cookiebot-panel);
}

.bp-cookiebot__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.bp-cookiebot__card-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: #fff;
}

.bp-cookiebot__card-copy {
    display: block;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
    font-size: 0.92rem;
}

.bp-cookiebot__card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #fff;
    cursor: pointer;
}

.bp-cookiebot__card input[type="checkbox"][disabled] {
    cursor: not-allowed;
}

.bp-cookiebot__details-actions {
    margin-top: 14px;
}

.bp-cookiebot-trigger {
    position: fixed;
    left: 20px;
    bottom: calc(20px + var(--bp-cookiebot-bottom-offset));
    z-index: 9997;
    border: 1px solid rgba(18, 20, 75, 0.12);
    border-radius: 8px;
    padding: 15px 24px;
    background: #fff;
    color: var(--bp-cookiebot-accent-strong);
    box-shadow: 0 12px 30px rgba(9, 15, 56, 0.18);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
}

.bp-cookiebot-trigger.is-visible {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bp-native-footer__cookie-trigger {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 1080px) {
    .bp-cookiebot__surface {
        grid-template-columns: 1fr;
        grid-template-areas:
            "eyebrow"
            "title"
            "body"
            "actions"
            "details";
    }

    .bp-cookiebot__actions {
        width: min(100%, 520px);
    }
}

@media (max-width: 767px) {
    .bp-cookiebot {
        left: 12px;
        right: 12px;
        bottom: calc(12px + var(--bp-cookiebot-bottom-offset));
    }

    .bp-cookiebot__surface {
        padding: 20px 18px;
        gap: 12px;
    }

    .bp-cookiebot__actions,
    .bp-cookiebot__details-actions {
        width: 100%;
        flex-direction: column;
    }

    .bp-cookiebot__cards {
        grid-template-columns: 1fr;
    }

    .bp-cookiebot-trigger {
        left: 12px;
        bottom: calc(12px + var(--bp-cookiebot-bottom-offset));
    }
}
