/**
 * Cursos LGPD - Estilos do Banner de Consentimento
 */

/* Reset e Base */
.lgpd-banner,
.lgpd-modal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.lgpd-banner *,
.lgpd-modal * {
    box-sizing: inherit;
}

/* ==========================================
   BANNER
   ========================================== */

.lgpd-banner {
    position: fixed;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

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

/* Posições do Banner */
.lgpd-banner.position-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
}

.lgpd-banner.position-bottom.active {
    transform: translateY(0);
}

.lgpd-banner.position-top {
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(-100%);
}

.lgpd-banner.position-top.active {
    transform: translateY(0);
}

.lgpd-banner.position-bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 400px;
    transform: translateX(-120%);
}

.lgpd-banner.position-bottom-left.active {
    transform: translateX(0);
}

.lgpd-banner.position-bottom-right {
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    transform: translateX(120%);
}

.lgpd-banner.position-bottom-right.active {
    transform: translateX(0);
}

.lgpd-banner.position-center {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
}

.lgpd-banner.position-center .lgpd-banner-content {
    max-width: 500px;
    border-radius: 12px;
}

/* Estilos do Banner */
.lgpd-banner.style-bar .lgpd-banner-content {
    padding: 15px 30px;
}

.lgpd-banner.style-box .lgpd-banner-content {
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lgpd-banner.style-modal .lgpd-banner-content {
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Conteúdo do Banner */
.lgpd-banner-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.lgpd-banner-text {
    flex: 1;
    min-width: 250px;
}

.lgpd-banner-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.lgpd-banner-message {
    margin: 0;
    opacity: 0.9;
}

.lgpd-banner-message a {
    color: inherit;
    text-decoration: underline;
}

.lgpd-banner-message a:hover {
    opacity: 0.8;
}

/* Botões do Banner */
.lgpd-banner-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lgpd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.lgpd-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lgpd-btn:active {
    transform: translateY(0);
}

.lgpd-btn-accept {
    color: #fff;
}

.lgpd-btn-reject {
    color: #fff;
}

.lgpd-btn-settings {
    background: transparent;
    border: 2px solid currentColor;
    opacity: 0.8;
}

.lgpd-btn-settings:hover {
    opacity: 1;
}

/* ==========================================
   MODAL DE CONFIGURAÇÕES
   ========================================== */

.lgpd-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

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

.lgpd-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.lgpd-modal-header {
    padding: 25px 25px 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lgpd-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.lgpd-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.lgpd-modal-close:hover {
    color: #1f2937;
}

.lgpd-modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

.lgpd-modal-description {
    margin: 0 0 20px;
    color: #6b7280;
}

/* Categorias no Modal */
.lgpd-modal-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lgpd-modal-category {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px 20px;
    transition: border-color 0.2s ease;
}

.lgpd-modal-category:hover {
    border-color: #d1d5db;
}

.lgpd-modal-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.lgpd-modal-category-info {
    flex: 1;
}

.lgpd-modal-category-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.lgpd-modal-category-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

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

.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: #d1d5db;
    transition: 0.3s;
    border-radius: 28px;
}

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

.lgpd-toggle input:checked + .lgpd-toggle-slider {
    background-color: #10b981;
}

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

.lgpd-toggle input:disabled + .lgpd-toggle-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

.lgpd-toggle input:disabled:checked + .lgpd-toggle-slider {
    background-color: #9ca3af;
}

.lgpd-always-active {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
}

/* Footer do Modal */
.lgpd-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f9fafb;
}

.lgpd-modal-footer .lgpd-btn {
    padding: 12px 30px;
}

/* ==========================================
   BOTÃO FLUTUANTE
   ========================================== */

.lgpd-float-btn {
    position: fixed;
    bottom: 20px;
    z-index: 99998;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
    transition: all 0.3s ease;
}

.lgpd-float-btn.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.lgpd-float-btn:hover {
    transform: scale(1.1);
}

.lgpd-float-btn.position-left {
    left: 20px;
}

.lgpd-float-btn.position-right {
    right: 20px;
}

.lgpd-float-btn svg {
    width: 24px;
    height: 24px;
}

/* ==========================================
   RESPONSIVO
   ========================================== */

@media (max-width: 768px) {
    .lgpd-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .lgpd-banner-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .lgpd-btn {
        flex: 1;
        min-width: 0;
    }
    
    .lgpd-banner.position-bottom-left,
    .lgpd-banner.position-bottom-right {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .lgpd-modal-content {
        max-height: 95vh;
        margin: 10px;
    }
    
    .lgpd-modal-footer {
        flex-direction: column;
    }
    
    .lgpd-modal-footer .lgpd-btn {
        width: 100%;
    }
}

/* ==========================================
   ACESSIBILIDADE
   ========================================== */

.lgpd-btn:focus,
.lgpd-toggle input:focus + .lgpd-toggle-slider,
.lgpd-modal-close:focus,
.lgpd-float-btn:focus {
    outline: 3px solid #6366f1;
    outline-offset: 2px;
}

/* Reduçir movimento para preferências de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .lgpd-banner,
    .lgpd-modal,
    .lgpd-modal-content,
    .lgpd-float-btn,
    .lgpd-btn,
    .lgpd-toggle-slider,
    .lgpd-toggle-slider:before {
        transition: none;
    }
}

/* ==========================================
   BODY STATES
   ========================================== */

body.lgpd-banner-visible {
    /* Espaço para banner bottom */
}

body.lgpd-modal-open {
    overflow: hidden;
}

/* ==========================================
   PRINT
   ========================================== */

@media print {
    .lgpd-banner,
    .lgpd-modal,
    .lgpd-float-btn {
        display: none !important;
    }
}
