/* ==========================================================================
   Custódio Advocacia — Camada de Consentimento de Cookies e LGPD
   Design elegante, neutro, sem dark patterns, responsivo (Desktop e Mobile)
   ========================================================================== */

:root {
    --cc-bg: #ffffff;
    --cc-text: #1a2b3c;
    --cc-text-muted: #556980;
    --cc-primary: #0d2238; /* Azul base do escritório */
    --cc-accent: #c5a880;  /* Bronze / Dourado elegante */
    --cc-border: #e2e8f0;
    --cc-radius: 10px;
    --cc-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
}

/* Banner Fixo Inferior */
.cc-banner-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    padding: 24px 28px;
    z-index: 999999;
    display: none;
    animation: ccFadeIn 0.3s ease-out forwards;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--cc-text);
}

.cc-banner-inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cc-banner-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-banner-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--cc-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

/* Grupo de Botões com Peso Visual Equivalente */
.cc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.cc-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid transparent;
    line-height: 1.2;
}

/* Botão Aceitar Todos */
.cc-btn-accept {
    background-color: var(--cc-primary);
    color: #ffffff;
    border-color: var(--cc-primary);
}
.cc-btn-accept:hover {
    background-color: #163659;
    border-color: #163659;
}

/* Botão Recusar Opcionais (Destaque Equivalente) */
.cc-btn-reject {
    background-color: #ffffff;
    color: var(--cc-primary);
    border-color: var(--cc-primary);
}
.cc-btn-reject:hover {
    background-color: #f1f5f9;
}

/* Botão Configurar Preferências */
.cc-btn-settings {
    background-color: #f8fafc;
    color: var(--cc-text-muted);
    border-color: var(--cc-border);
}
.cc-btn-settings:hover {
    background-color: #e2e8f0;
    color: var(--cc-text);
}

/* Modal de Preferências */
.cc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 34, 56, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cc-modal-box {
    background: #ffffff;
    border-radius: 12px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    padding: 32px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--cc-text);
}

.cc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--cc-border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.cc-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--cc-primary);
    margin: 0 0 6px 0;
}

.cc-modal-desc {
    font-size: 14px;
    color: var(--cc-text-muted);
    line-height: 1.5;
    margin: 0;
}

.cc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--cc-text-muted);
    cursor: pointer;
    padding: 4px;
}
.cc-modal-close:hover {
    color: var(--cc-primary);
}

/* Categorias de Cookies */
.cc-categories-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.cc-category-item {
    border: 1px solid var(--cc-border);
    border-radius: 8px;
    padding: 16px;
    background: #fafbfc;
}

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

.cc-category-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--cc-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-badge-required {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.cc-category-desc {
    font-size: 13px;
    color: var(--cc-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Toggle Switch */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 10px;
}

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

.cc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.cc-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .cc-slider {
    background-color: var(--cc-primary);
}

input:disabled + .cc-slider {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

input:checked + .cc-slider:before {
    transform: translateX(20px);
}

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

@keyframes ccFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade Mobile (iPhone / Android) */
@media (max-width: 768px) {
    .cc-banner-container {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 18px;
    }

    .cc-banner-title {
        font-size: 16px;
    }

    .cc-banner-text {
        font-size: 13px;
    }

    .cc-banner-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .cc-btn {
        width: 100%;
        padding: 13px 16px;
        font-size: 14px;
    }

    .cc-modal-backdrop {
        padding: 12px;
    }

    .cc-modal-box {
        padding: 20px 14px;
        max-height: 85vh;
        width: 100%;
        max-width: 350px;
        box-sizing: border-box;
    }

    .cc-category-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .cc-category-title {
        font-size: 14px;
        flex: 1;
        flex-wrap: wrap;
    }

    .cc-switch {
        flex-shrink: 0;
    }

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

    .cc-modal-footer .cc-btn {
        width: 100%;
    }
}
