/* Banner de consentimento de cookies (RGPD / AEPD) */

.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    background: var(--bg-card, #fff);
    border-top: 3px solid var(--primary-blue, #0065AE);
    box-shadow: 0 -6px 30px rgba(37, 44, 97, .15);
    padding: 22px 0;
    font-family: 'Poppins', Helvetica, Arial, sans-serif;
}

.cc-banner[hidden],
.cc-modal[hidden] { display: none; }

.cc-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 28px;
}

.cc-text { flex: 1; min-width: 0; }

.cc-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a2e);
    margin-bottom: 6px;
}

.cc-desc {
    font-size: .875rem;
    line-height: 1.6;
    color: var(--text-gray, #555);
}

.cc-desc a {
    color: var(--primary-blue, #0065AE);
    text-decoration: underline;
}

.cc-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Rejeitar tem de ter o mesmo peso visual que aceitar (AEPD) */
.cc-btn {
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 10px;
    border: 2px solid var(--primary-blue, #0065AE);
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s ease;
}

.cc-btn:hover { opacity: .85; }

.cc-btn:focus-visible {
    outline: 3px solid var(--accent, #5ec4ff);
    outline-offset: 2px;
}

.cc-btn-primary {
    background: var(--primary-blue, #0065AE);
    color: #fff;
}

.cc-btn-secondary {
    background: #fff;
    color: var(--primary-blue, #0065AE);
}

.cc-btn-link {
    background: none;
    border: 2px solid transparent;
    color: var(--text-gray, #555);
    text-decoration: underline;
}

/* Modal de preferencias */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(26, 26, 46, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cc-modal-box {
    background: #fff;
    border-radius: var(--radius, 14px);
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(37, 44, 97, .3);
    font-family: 'Poppins', Helvetica, Arial, sans-serif;
}

.cc-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark, #1a1a2e);
    margin-bottom: 8px;
}

.cc-modal-intro {
    font-size: .875rem;
    color: var(--text-gray, #555);
    line-height: 1.6;
    margin-bottom: 24px;
}

.cc-cat {
    border: 1px solid var(--border, #eee);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 14px;
}

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

.cc-cat-name {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a2e);
}

.cc-cat-desc {
    font-size: .82rem;
    line-height: 1.6;
    color: var(--text-light, #6b7280);
}

.cc-always {
    font-size: .78rem;
    font-weight: 600;
    color: var(--success-green, #10b981);
    white-space: nowrap;
}

/* Toggle */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.cc-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: background .2s ease;
    pointer-events: none;
}

.cc-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}

.cc-switch input:checked + .cc-slider { background: var(--primary-blue, #0065AE); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }

.cc-switch input:focus-visible + .cc-slider {
    outline: 3px solid var(--accent, #5ec4ff);
    outline-offset: 2px;
}

.cc-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cc-modal-actions .cc-btn { flex: 1; min-width: 150px; }

/* Link permanente no rodape */
.cc-prefs-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.cc-prefs-link:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .cc-inner { flex-direction: column; align-items: stretch; gap: 18px; }
    .cc-actions { flex-direction: column; }
    .cc-btn { width: 100%; }
    .cc-modal-box { padding: 24px; }
}
