/* =========================================
   Cookie Consent — banner + modal
   Paleta e tipografia alinhadas ao site
========================================= */

.cc-banner,
.cc-modal {
    --cc-primary: #36A9E1;
    --cc-primary-hover: #5DC0F0;
    --cc-dark: #2D4066;
    --cc-text: #5B6472;
    --cc-border: #E3E7EC;
    --cc-bg-soft: #F6F8FA;
    --cc-radius: 0px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Banner ---------- */

.cc-banner {
    position: fixed;
    left: 24px;
    bottom: 24px;
    /* Abaixo do backdrop do modal (1050) e acima da navbar fixa (1030):
       com o modal de preferências aberto o banner fica atrás do escurecido */
    z-index: 1040;
    max-width: 400px;
    width: calc(100% - 48px);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.cc-banner.cc-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cc-banner-card {
    background: #ffffff;
    border-radius: var(--cc-radius);
    box-shadow: 0 12px 32px rgba(24, 39, 75, 0.16);
    padding: 28px;
}

.cc-banner-title {
    font-size: 16px;
    line-height: 21px;
    font-weight: 700;
    color: var(--cc-dark);
    margin: 0 0 5px;
}

.cc-banner-text {
    font-size: 13px;
    line-height: 18px;
    color: var(--cc-text);
    margin: 0 0 20px;
}

.cc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cc-banner .btn-light {
    color: #909090;
    background-color: #f5f5f5;
}

.cc-banner .btn-light:hover {
    color: #36A9E1;
    background-color: #f1faff;
}

/* ---------- Modal ---------- */

.cc-modal .modal-dialog {
    max-width: 900px;

}
.cc-modal {
     z-index: 1081;
}

.cc-modal .modal-content {
    border: none;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(24, 39, 75, 0.25);
}

.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    border-bottom: 1px solid var(--cc-border);
}

.cc-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--cc-dark);
    margin: 0;
    line-height: 24px;
}

.cc-modal-body {
    padding: 0;
}

.cc-modal-layout {
    display: flex;
    min-height: 380px;
}

/* Barra lateral */

.cc-sidebar {
    width: 260px;
    flex-shrink: 0;
    background-color: var(--cc-bg-soft);
    border-right: 1px solid var(--cc-border);
    padding: 12px;
}

.cc-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 0px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #8A93A2;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cc-nav-link + .cc-nav-link {
    margin-top: 2px;
}

.cc-nav-link:hover {
    background-color: rgba(54, 169, 225, 0.12);
    color: var(--cc-dark);
    font-weight: 600;
}

.cc-nav-link.active {
    background-color: rgba(54, 169, 225, 0.12);
    color: var(--cc-dark);
    font-weight: 600;
}

.cc-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C7CFDA;
    transition: color 0.2s ease;
    font-size: 11px;
}

.cc-nav-link.active .cc-chevron {
    color: var(--cc-primary);
}

/* Conteúdo */

.cc-content {
    flex: 1;
    padding: 16px 32px;
}

.cc-pane-heading {
        font-size: 16px;
    font-weight: 700;
    color: var(--cc-dark);
    margin: 0 0 5px;
    line-height: 21px;
}

.cc-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--cc-text);
    margin: 0 0 16px;
}

.cc-content p:last-child {
    margin-bottom: 0;
}

.cc-content a {
    color: var(--cc-primary);
    text-decoration: underline;
}

.cc-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.cc-pane-header .cc-pane-heading {
    margin-bottom: 0;
}

/* Switch (toggle) */

.cc-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    min-height: 0;
}

.cc-switch .form-check-input {
    width: 40px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    background-color: #DCE1E8;
    border-color: #DCE1E8;
}

.cc-switch .form-check-input:checked {
    background-color: var(--cc-primary);
    border-color: var(--cc-primary);
}

.cc-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(54, 169, 225, 0.2);
}

.cc-switch .form-check-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cc-switch-label {
    font-size: 13px;
    font-weight: 600;
    color: #8A93A2;
    white-space: nowrap;
}

/* Rodapé */

.cc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--cc-border);
    background-color: #ffffff;
}

.cc-modal-footer .btn-light {
    color: #909090;
    background-color: #f5f5f5;
}

.cc-modal-footer .btn-light:hover {
    color: #36A9E1;
    background-color: #f1faff;
}

.cc-modal-header .btn-close-modal {
    padding: 6px 10px;
    font-size: 21px;
    color: #2d4066;
    margin: 0px;
    text-align: center;
}


/* ---------- Responsivo ---------- */

@media (max-width: 767.98px) {
    .cc-banner {
        left: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
    }

    /* O banner ocupa a base inteira da tela: enquanto estiver aberto,
       os botões fixos saem do caminho (voltam após a escolha).
       !important porque o #backToTop recebe display inline do custom.js */
    #ccBanner.cc-show ~ .whatsapp-btn,
    #ccBanner.cc-show ~ #backToTop {
        display: none !important;
    }

    .cc-banner-card {
        padding: 22px;
    }

    .cc-banner .btn,
    .cc-modal-footer .btn {
        min-height: 44px;
    }

    .cc-modal-layout {
        flex-direction: column;
    }

    .cc-sidebar {
        width: 100%;
        display: flex;
        /* vence o flex-direction: column !important do utilitário
           .flex-column (Bootstrap) presente no HTML */
        flex-direction: row !important;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--cc-border);
        gap: 4px;
    }

    .cc-nav-link {
        white-space: nowrap;
    }

    .cc-nav-link + .cc-nav-link {
        margin-top: 0;
    }

    .cc-content {
        padding: 22px;
    }

    .cc-switch .form-check-input {
        width: 48px;
        height: 26px;
    }

    .cc-modal-footer {
        flex-wrap: wrap;
    }

    .cc-modal-footer .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Telas baixas (paisagem de celular): o modal ganha scroll interno
   em vez de estourar a viewport */
@media (max-height: 640px) {
    .cc-modal .modal-content {
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        overflow-y: auto;
    }

    .cc-modal-layout {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-banner {
        transition: none;
    }
}
