/* Cookie Consent - LGPD Compliance */
:root {
    --cc-bg: #FFFFFF;
    --cc-text: #333333;
    --cc-text-secondary: #6B7280;
    --cc-primary: #2563EB;
    --cc-primary-hover: #1D4ED8;
    --cc-border: #E5E7EB;
    --cc-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    --cc-radius: 12px;
    --cc-z-banner: 99990;
    --cc-z-modal: 99999;
}

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--cc-z-banner);
    background: var(--cc-bg);
    box-shadow: var(--cc-shadow);
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--cc-text);
    display: none;
    animation: cc-slide-up 0.4s ease;
}

.cookie-consent-banner.cookie-consent-hidden {
    animation: cc-slide-down 0.3s ease forwards;
}

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

@keyframes cc-slide-down {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.cc-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.cc-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #F3F4F6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.cc-banner-content {
    flex: 1;
    min-width: 250px;
}

.cc-banner-content p {
    margin: 0;
    font-size: 13px;
    color: var(--cc-text-secondary);
}

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

.cc-banner-content a:hover {
    color: var(--cc-primary-hover);
}

.cc-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.cc-btn-primary {
    background: var(--cc-primary);
    color: #FFFFFF;
}

.cc-btn-primary:hover {
    background: var(--cc-primary-hover);
    transform: translateY(-1px);
}

.cc-btn-secondary {
    background: transparent;
    color: var(--cc-text);
    border: 1.5px solid var(--cc-border);
}

.cc-btn-secondary:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.cc-btn-link {
    background: transparent;
    color: var(--cc-text-secondary);
    padding: 10px 12px;
    font-weight: 500;
    text-decoration: underline;
}

.cc-btn-link:hover {
    color: var(--cc-text);
}

/* Modal de Preferências */
.cookie-preferences-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--cc-z-modal);
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: cc-fade-in 0.2s ease;
}

@keyframes cc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cc-modal-dialog {
    background: var(--cc-bg);
    border-radius: 16px;
    max-width: 540px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.cc-modal-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cc-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--cc-text);
}

.cc-modal-close {
    background: #F3F4F6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--cc-text-secondary);
    transition: background 0.2s;
}

.cc-modal-close:hover {
    background: #E5E7EB;
}

.cc-modal-body {
    padding: 16px 24px;
}

.cc-modal-body p {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--cc-text-secondary);
}

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

.cc-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cc-category-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--cc-border);
}

.cc-category-item:last-child {
    border-bottom: none;
}

.cc-category-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #F3F4F6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-top: 2px;
}

.cc-category-info {
    flex: 1;
}

.cc-category-info h4 {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cc-text);
}

.cc-category-info p {
    margin: 0;
    font-size: 12px;
    color: var(--cc-text-secondary);
}

.cc-toggle-label {
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.cc-toggle {
    display: none;
}

.cc-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #D1D5DB;
    border-radius: 12px;
    transition: background 0.2s;
    cursor: pointer;
}

.cc-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #FFFFFF;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cc-toggle:checked + .cc-toggle-switch {
    background: var(--cc-primary);
}

.cc-toggle:checked + .cc-toggle-switch::after {
    transform: translateX(20px);
}

.cc-toggle:disabled + .cc-toggle-switch {
    opacity: 0.6;
    cursor: not-allowed;
}

.cc-modal-footer {
    padding: 0 24px 20px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Floating preferences button */
.cookie-preferences-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99980;
    width: 44px;
    height: 44px;
    background: var(--cc-bg);
    border: 1.5px solid var(--cc-border);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    font-size: 18px;
    transition: all 0.2s;
}

.cookie-preferences-float:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}

.cookie-preferences-float.visible {
    display: flex;
}

/* Responsivo */
@media (max-width: 640px) {
    .cc-banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .cc-banner-actions .cc-btn {
        width: 100%;
        text-align: center;
    }

    .cc-modal-dialog {
        width: 95%;
        max-height: 90vh;
        margin: 10px;
    }
}
