/* ============================================================
   Gerenciador de consentimento de cookies (LGPD / ANPD)
   Cores da identidade: --bs-secondary (#06122E) e --bs-primary (#F6C100)
   ============================================================ */

/* 1º nível - banner fixo no rodapé, sem bloquear a navegação */
.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045; /* abaixo do .modal (1055) do Bootstrap */
    background: #fff;
    color: var(--bs-secondary, #06122E);
    border-top: 4px solid var(--bs-primary, #F6C100);
    box-shadow: 0 -4px 16px rgba(6, 18, 46, .15);
    padding: 16px 0;
    font-size: 14px;
    max-height: 70vh;
    overflow-y: auto;
}
.cc-banner[hidden] { display: none; }

.cc-banner-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cc-banner-titulo {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: inherit;
}
.cc-banner-texto p { margin: 0; line-height: 1.5; }
.cc-banner a,
.cc-modal .modal-body a {
    color: var(--bs-secondary, #06122E);
    text-decoration: underline;
    font-weight: 500;
}
.cc-banner-botoes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cc-banner-botoes .btn,
.cc-modal-rodape .btn {
    font-size: 14px;
    white-space: nowrap;
}

@media (min-width: 576px) {
    .cc-banner-botoes { flex-direction: row; flex-wrap: wrap; }
    .cc-banner-botoes .btn { flex: 1 1 auto; }
}
@media (min-width: 992px) {
    .cc-banner { font-size: 15px; }
    .cc-banner-inner { flex-direction: row; align-items: center; gap: 24px; }
    .cc-banner-texto { flex: 1 1 auto; }
    .cc-banner-botoes { flex: 0 0 auto; flex-wrap: nowrap; }
}

/* 2º nível - modal de preferências */
.cc-modal .modal-title { color: var(--bs-secondary, #06122E); font-weight: 700; }
.cc-categoria {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
}
.cc-categoria-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cc-categoria-topo label { cursor: pointer; margin: 0; }
.cc-categoria-desc { margin: 6px 0 0; font-size: 14px; color: #495057; }
.cc-categoria .form-switch .form-check-input {
    width: 2.75em;
    height: 1.4em;
    cursor: pointer;
}
.cc-categoria .form-check-input:checked {
    background-color: var(--bs-secondary, #06122E);
    border-color: var(--bs-secondary, #06122E);
}
.cc-categoria .form-check-input:focus-visible,
.cc-reabrir:focus-visible,
.cc-banner .btn:focus-visible {
    outline: 3px solid var(--bs-primary, #F6C100);
    outline-offset: 2px;
}
.cc-sempre { color: #146c43 !important; border: 1px solid #a3cfbb; font-weight: 500; }
.cc-modal-rodape { flex-wrap: wrap; gap: 8px; }
.cc-modal-rodape .btn { margin: 0; flex: 1 1 auto; }
.cc-id code { word-break: break-all; }

/* Botão flutuante para rever as escolhas a qualquer momento */
.cc-reabrir {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1040;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--bs-secondary, #06122E);
    color: var(--bs-primary, #F6C100);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(6, 18, 46, .3);
    cursor: pointer;
    transition: transform .15s ease;
}
.cc-reabrir[hidden] { display: none; }
.cc-reabrir:hover { transform: scale(1.06); }

/* Link "Preferências de cookies" no rodapé (botão com aparência de link) */
.cc-link-rodape {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.cc-link-rodape:hover { text-decoration: underline; }

/* Evita que o banner cubra o fim da página */
html.cc-banner-visivel body { padding-bottom: 240px; }
@media (min-width: 992px) {
    html.cc-banner-visivel body { padding-bottom: 120px; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-reabrir { transition: none; }
}
