/**
 * Cookie Consent Banner - Styles
 * Design moderno, acessível e responsivo
 * LGPD & GDPR Compliant
 */

/* Banner Principal */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, rgba(11, 16, 48, 0.98) 0%, rgba(16, 21, 60, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(88, 88, 255, 0.2);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.cookie-consent-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-content {
    flex: 1;
    min-width: 280px;
}

.cookie-consent-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-consent-description {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.cookie-consent-link {
    color: #5858ff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-consent-link:hover {
    color: #7878ff;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Botões */
.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #5858ff 0%, #4040dd 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(88, 88, 255, 0.3);
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #6868ff 0%, #5050ee 100%);
    box-shadow: 0 6px 16px rgba(88, 88, 255, 0.4);
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.cookie-btn-outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* Modal de Customização */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.cookie-modal-content {
    position: relative;
    background: linear-gradient(135deg, #0b1030 0%, #101538 100%);
    border: 1px solid rgba(88, 88, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-description {
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(88, 88, 255, 0.3);
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

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

.cookie-category-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.cookie-category-description {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: #ffffff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, #5858ff 0%, #4040dd 100%);
    border-color: #5858ff;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-toggle input:focus + .cookie-toggle-slider {
    box-shadow: 0 0 0 3px rgba(88, 88, 255, 0.3);
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Responsivo */
@media (max-width: 768px) {
    .cookie-consent-container {
        flex-direction: column;
        gap: 1.25rem;
    }

    .cookie-consent-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        min-width: 0;
    }

    .cookie-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-modal-header {
        padding: 1.25rem;
    }

    .cookie-modal-title {
        font-size: 1.25rem;
    }

    .cookie-modal-body {
        padding: 1.25rem;
    }

    .cookie-modal-footer {
        padding: 1.25rem;
        flex-direction: column-reverse;
    }

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

    .cookie-category {
        padding: 1rem;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 1rem;
    }

    .cookie-consent-title {
        font-size: 1.1rem;
    }

    .cookie-consent-description {
        font-size: 0.9rem;
    }

    .cookie-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-modal,
    .cookie-modal-content,
    .cookie-btn,
    .cookie-category,
    .cookie-toggle-slider,
    .cookie-toggle-slider:before {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top: 2px solid #ffffff;
    }

    .cookie-category {
        border-width: 2px;
    }

    .cookie-btn-primary {
        border: 2px solid #ffffff;
    }
}

/* Dark Mode adicional (se necessário) */
@media (prefers-color-scheme: light) {
    .cookie-consent-banner {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 247, 250, 0.98) 100%);
        border-top-color: rgba(0, 0, 0, 0.1);
        color: #1a1a2e;
    }

    .cookie-consent-title {
        color: #1a1a2e;
    }

    .cookie-consent-description {
        color: rgba(0, 0, 0, 0.75);
    }

    .cookie-modal-content {
        background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
        border-color: rgba(0, 0, 0, 0.15);
    }

    .cookie-modal-title,
    .cookie-category-title {
        color: #1a1a2e;
    }

    .cookie-modal-description,
    .cookie-category-description {
        color: rgba(0, 0, 0, 0.7);
    }

    .cookie-category {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.1);
    }

    .cookie-category:hover {
        background: rgba(0, 0, 0, 0.05);
        border-color: #5858ff;
    }

    .cookie-btn-secondary {
        background: rgba(0, 0, 0, 0.06);
        color: #1a1a2e;
        border-color: rgba(0, 0, 0, 0.15);
    }

    .cookie-btn-outline {
        color: #1a1a2e;
        border-color: rgba(0, 0, 0, 0.2);
    }

    .cookie-modal-close {
        color: rgba(0, 0, 0, 0.6);
    }

    .cookie-modal-close:hover {
        background: rgba(0, 0, 0, 0.06);
        color: #1a1a2e;
    }
}
