/*
 * Banner de Cookies — Braseal Vedações
 * Autossuficiente (variáveis próprias), segue identidade visual da marca.
 */

:root {
    --bz-primary: #0065AF;
    --bz-primary-hover: #004d85;
    --bz-secondary: #00A7B5;
    --bz-secondary-hover: #008a96;
    --bz-gray: #7A8381;
    --bz-gray-light: #f4f6f6;
    --bz-gray-border: #e0e3e2;
    --bz-dark: #16241f;
    --bz-white: #ffffff;
    --bz-radius: 12px;
    --bz-radius-sm: 8px;
    --bz-font: 'Inter', Arial, sans-serif;
    --bz-shadow: 0 -4px 24px rgba(15, 23, 20, 0.14);
}

#bz-banner,
#bz-modal-overlay {
    font-family: var(--bz-font);
    box-sizing: border-box;
}

#bz-banner *,
#bz-modal-overlay * {
    box-sizing: border-box;
}

/* ---------- Banner inferior ---------- */
#bz-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    background: var(--bz-white);
    border-top: 1px solid var(--bz-gray-border);
    box-shadow: var(--bz-shadow);
    padding: 20px 24px;
    display: none;
    animation: bz-slide-up 0.35s ease-out;
}

#bz-banner.bz-visible {
    display: block;
}

@keyframes bz-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bz-banner-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.bz-banner-text {
    flex: 1 1 380px;
    min-width: 260px;
}

.bz-banner-text h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bz-dark);
    margin: 0 0 6px;
}

.bz-banner-text p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--bz-gray);
    margin: 0;
}

.bz-banner-text a {
    color: var(--bz-primary);
    text-decoration: underline;
    font-weight: 600;
}

.bz-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.bz-btn {
    font-family: var(--bz-font);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 11px 20px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bz-btn-primary {
    background: var(--bz-primary);
    color: var(--bz-white);
    border-color: var(--bz-primary);
}

.bz-btn-primary:hover {
    background: var(--bz-primary-hover);
    border-color: var(--bz-primary-hover);
}

.bz-btn-outline {
    background: transparent;
    color: var(--bz-dark);
    border-color: var(--bz-gray-border);
}

.bz-btn-outline:hover {
    border-color: var(--bz-gray);
    background: var(--bz-gray-light);
}

.bz-btn-text {
    background: transparent;
    color: var(--bz-primary);
    border-color: transparent;
    padding: 11px 8px;
    text-decoration: underline;
}

/* ---------- Modal "Personalizar" ---------- */
#bz-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 20, 0.55);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#bz-modal-overlay.bz-visible {
    display: flex;
}

.bz-modal {
    background: var(--bz-white);
    border-radius: var(--bz-radius);
    max-width: 560px;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    padding: 28px;
}

.bz-modal h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bz-dark);
    margin: 0 0 8px;
}

.bz-modal>p {
    font-size: 0.875rem;
    color: var(--bz-gray);
    line-height: 1.5;
    margin: 0 0 20px;
}

.bz-category {
    border: 1px solid var(--bz-gray-border);
    border-radius: var(--bz-radius-sm);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.bz-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bz-category-head strong {
    font-size: 0.9rem;
    color: var(--bz-dark);
}

.bz-category p {
    font-size: 0.8125rem;
    color: var(--bz-gray);
    margin: 6px 0 0;
    line-height: 1.5;
}

/* Toggle switch */
.bz-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.bz-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bz-switch-track {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bz-gray-border);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.bz-switch-track::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: var(--bz-white);
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.bz-switch input:checked+.bz-switch-track {
    background: var(--bz-secondary);
}

.bz-switch input:checked+.bz-switch-track::before {
    transform: translateX(18px);
}

.bz-switch input:disabled+.bz-switch-track {
    background: var(--bz-primary);
    opacity: 0.55;
    cursor: not-allowed;
}

.bz-switch input:focus-visible+.bz-switch-track {
    outline: 2px solid var(--bz-primary);
    outline-offset: 2px;
}

.bz-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}

.bz-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--bz-gray);
    padding: 4px;
    line-height: 0;
}

.bz-modal {
    position: relative;
}

@media (max-width: 640px) {
    #bz-banner {
        padding: 18px 16px;
    }

    .bz-banner-actions {
        width: 100%;
    }

    .bz-banner-actions .bz-btn {
        flex: 1 1 auto;
    }
}
