/**
 * Estilos CSS para Banner LGPD
 * 
 * Este arquivo contém todos os estilos necessários para o banner de conformidade
 * com a Lei Geral de Proteção de Dados (LGPD) e controle de cookies.
 * 
 * Características:
 * - Design responsivo e moderno
 * - Animações suaves
 * - Acessibilidade completa
 * - Compatibilidade com diferentes navegadores
 * - Integração com o tema existente
 * 
 * @author FERAFOX
 * @version 1.0
 * @since 2025
 */

/* ===== BANNER LGPD PRINCIPAL ===== */
.lgpd-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    border-top: 3px solid #3498db;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Montserrat', sans-serif;
}

.lgpd-banner.show {
    transform: translateY(0);
}

.lgpd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.lgpd-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.lgpd-text {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.lgpd-icon {
    background: #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.lgpd-icon i {
    font-size: 18px;
    color: #ffffff;
}

.lgpd-message h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #ecf0f1;
}

.lgpd-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #bdc3c7;
}

.lgpd-privacy-link {
    color: #3498db;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.lgpd-privacy-link:hover {
    color: #5dade2;
}

.lgpd-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== BOTÕES LGPD ===== */
.lgpd-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    min-width: 100px;
    justify-content: center;
}

.lgpd-btn i {
    font-size: 12px;
}

.lgpd-btn-accept {
    background: #27ae60;
    color: #ffffff;
}

.lgpd-btn-accept:hover {
    background: #2ecc71;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.lgpd-btn-reject {
    background: #e74c3c;
    color: #ffffff;
}

.lgpd-btn-reject:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.lgpd-btn-preferences {
    background: #f39c12;
    color: #ffffff;
}

.lgpd-btn-preferences:hover {
    background: #e67e22;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.lgpd-btn-close {
    background: transparent;
    color: #bdc3c7;
    border: 1px solid #7f8c8d;
    min-width: 40px;
    padding: 8px;
}

.lgpd-btn-close:hover {
    background: #7f8c8d;
    color: #ffffff;
}

.lgpd-btn-primary {
    background: #3498db;
    color: #ffffff;
}

.lgpd-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.lgpd-btn-secondary {
    background: #95a5a6;
    color: #ffffff;
}

.lgpd-btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

/* ===== MODAL DE PREFERÊNCIAS ===== */
.lgpd-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lgpd-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.lgpd-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: lgpdModalSlideIn 0.3s ease-out;
}

@keyframes lgpdModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lgpd-modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 20px;
}

.lgpd-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.lgpd-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lgpd-modal-close:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.lgpd-modal-body {
    padding: 0 24px;
}

.lgpd-cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

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

.lgpd-category-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.lgpd-category-description {
    margin: 0;
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* ===== TOGGLE SWITCH ===== */
.lgpd-toggle {
    position: relative;
    display: inline-block;
}

.lgpd-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.lgpd-toggle-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background: #bdc3c7;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lgpd-toggle-label:hover {
    background: #95a5a6;
}

.lgpd-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lgpd-toggle input[type="checkbox"]:checked + .lgpd-toggle-label {
    background: #3498db;
}

.lgpd-toggle input[type="checkbox"]:checked + .lgpd-toggle-label .lgpd-toggle-slider {
    transform: translateX(26px);
}

.lgpd-toggle input[type="checkbox"]:disabled + .lgpd-toggle-label {
    background: #27ae60;
    cursor: not-allowed;
}

.lgpd-modal-footer {
    padding: 20px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #ecf0f1;
    margin-top: 20px;
}

/* ===== OVERLAY DE CONTEÚDO ===== */
.lgpd-content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.95);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lgpd-overlay-content {
    text-align: center;
    color: #ffffff;
    max-width: 400px;
    padding: 40px;
}

.lgpd-overlay-icon {
    font-size: 48px;
    color: #f39c12;
    margin-bottom: 20px;
}

.lgpd-overlay-content h3 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 600;
}

.lgpd-overlay-content p {
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #bdc3c7;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .lgpd-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .lgpd-text {
        min-width: auto;
    }
    
    .lgpd-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .lgpd-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .lgpd-modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .lgpd-modal-header,
    .lgpd-modal-body,
    .lgpd-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .lgpd-modal-footer {
        flex-direction: column;
    }
    
    .lgpd-modal-footer .lgpd-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .lgpd-container {
        padding: 16px;
    }
    
    .lgpd-text {
        flex-direction: column;
        gap: 12px;
    }
    
    .lgpd-icon {
        align-self: flex-start;
    }
    
    .lgpd-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .lgpd-btn {
        width: 100%;
        min-width: auto;
    }
    
    .lgpd-overlay-content {
        padding: 20px;
    }
    
    .lgpd-overlay-icon {
        font-size: 36px;
    }
    
    .lgpd-overlay-content h3 {
        font-size: 20px;
    }
    
    .lgpd-overlay-content p {
        font-size: 14px;
    }
}

/* ===== ANIMAÇÕES E TRANSIÇÕES ===== */
.lgpd-banner,
.lgpd-modal,
.lgpd-content-overlay {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

.lgpd-banner.show {
    animation-name: lgpdBannerSlideUp;
}

@keyframes lgpdBannerSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.lgpd-modal.show {
    animation-name: lgpdModalFadeIn;
}

@keyframes lgpdModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== ACESSIBILIDADE ===== */
.lgpd-btn:focus,
.lgpd-modal-close:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.lgpd-toggle input[type="checkbox"]:focus + .lgpd-toggle-label {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* ===== ESTADOS DE CARREGAMENTO ===== */
.lgpd-btn.loading {
    position: relative;
    color: transparent;
}

.lgpd-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: lgpdSpin 1s linear infinite;
}

@keyframes lgpdSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .lgpd-modal-content {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .lgpd-modal-header h3 {
        color: #ecf0f1;
    }
    
    .lgpd-category-header h4 {
        color: #ecf0f1;
    }
    
    .lgpd-cookie-category {
        background: #34495e;
    }
    
    .lgpd-category-description {
        color: #bdc3c7;
    }
    
    .lgpd-modal-header,
    .lgpd-modal-footer {
        border-color: #34495e;
    }
}
