/* LGPD Cookies Plugin Styles */

/* Reset e configurações gerais */
.lgpd-cookies * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Modal inicial - parte inferior central */
.lgpd-cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 24px;
    max-width: 600px;
    width: 90%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e0e0e0;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.lgpd-cookie-banner.hidden {
    display: none;
}

.lgpd-banner-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
}

.lgpd-banner-text {
    font-size: 14px;
    line-height: 1.5;
    color: #666666;
    margin-bottom: 16px;
}

.lgpd-banner-text a {
    color: var(--lgpd-primary-color, #8B5A96);
    text-decoration: none;
    font-weight: 500;
}

.lgpd-banner-text a:hover {
    text-decoration: underline;
}

.lgpd-banner-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lgpd-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.lgpd-btn-primary {
    background-color: var(--lgpd-primary-color, #8B5A96);
    color: white;
}

.lgpd-btn-primary:hover {
    background-color: var(--lgpd-primary-color-hover, #7A4F85);
    transform: translateY(-1px);
}

.lgpd-btn-secondary {
    background-color: transparent;
    color: #666666;
    border: 2px solid #e0e0e0;
}

.lgpd-btn-secondary:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
    color:#000000;
}

.lgpd-btn-outline {
    background-color: transparent;
    color: var(--lgpd-primary-color, #8B5A96);
    border: 2px solid var(--lgpd-primary-color, #8B5A96);
}

.lgpd-btn-outline:hover {
    background-color: var(--lgpd-primary-color, #8B5A96);
    color: white;
}

/* Overlay para modal de personalização */
.lgpd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lgpd-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal de personalização - centralizado */
.lgpd-customize-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lgpd-modal-overlay.active .lgpd-customize-modal {
    transform: scale(1);
}

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

.lgpd-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
}

.lgpd-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.lgpd-modal-close:hover {
    color: #666666;
    background-color: #f5f5f5;
}

.lgpd-modal-content {
    padding: 24px;
}

.lgpd-cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
}

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

.lgpd-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.lgpd-category-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.4;
}

/* Toggle Switch */
.lgpd-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.lgpd-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

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

.lgpd-toggle input:checked + .lgpd-toggle-slider {
    background-color: var(--lgpd-primary-color, #8B5A96);
}

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

.lgpd-toggle.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.lgpd-toggle.disabled .lgpd-toggle-slider {
    background-color: var(--lgpd-primary-color, #8B5A96);
}

.lgpd-modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsividade */
@media (max-width: 768px) {
    .lgpd-cookie-banner {
        bottom: 10px;
        width: 95%;
        padding: 20px;
    }
    
    .lgpd-banner-buttons {
        flex-direction: column;
    }
    
    .lgpd-btn {
        width: 100%;
        min-width: auto;
    }
    
    .lgpd-customize-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .lgpd-modal-footer {
        flex-direction: column;
    }
    
    .lgpd-modal-footer .lgpd-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .lgpd-cookie-banner {
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        border-radius: 12px 12px 0 0;
    }
    
    .lgpd-banner-title {
        font-size: 16px;
    }
    
    .lgpd-banner-text {
        font-size: 13px;
    }
}

/* Animações adicionais */
.lgpd-fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

/* Acessibilidade */
.lgpd-btn:focus,
.lgpd-toggle:focus-within,
.lgpd-modal-close:focus {
    outline: 2px solid var(--lgpd-primary-color, #8B5A96);
    outline-offset: 2px;
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    .lgpd-cookie-banner {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .lgpd-banner-title {
        color: #ffffff;
    }
    
    .lgpd-banner-text {
        color: #cccccc;
    }
    
    .lgpd-customize-modal {
        background: #2d2d2d;
    }
    
    .lgpd-modal-title {
        color: #ffffff;
    }
    
    .lgpd-cookie-category {
        background: #FFFFFF;
        border-color: #404040;
    }
    
    .lgpd-category-title {
        color: #ffffff;
    }
    
    .lgpd-category-description {
        color: #cccccc;
    }
}