/**
 * Cursos LGPD - Estilos do Banner de Consentimento
 * Design: Clean, minimalista, compacto
 */

/* Reset e Base */
.lgpd-banner,
.lgpd-modal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 13px;
    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: 20px;
    left: 20px;
    right: auto;
    max-width: 380px;
    transform: translateY(20px);
}

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

.lgpd-banner.position-top {
    top: 20px;
    left: 20px;
    right: auto;
    max-width: 380px;
    transform: translateY(-20px);
}

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

.lgpd-banner.position-bottom-left {
    bottom: 20px;
    left: 20px;
    max-width: 380px;
    transform: translateY(20px);
}

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

.lgpd-banner.position-bottom-right {
    bottom: 20px;
    right: 20px;
    left: auto;
    max-width: 380px;
    transform: translateY(20px);
}

.lgpd-banner.position-bottom-right.active {
    transform: translateY(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.4);
    padding: 20px;
}

.lgpd-banner.position-center .lgpd-banner-content {
    max-width: 380px;
}

/* Conteúdo do Banner - Design Clean */
.lgpd-banner-content {
    background: var(--lgpd-bg, #fff);
    color: var(--lgpd-text, #374151);
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.lgpd-banner.style-bar .lgpd-banner-content,
.lgpd-banner.style-box .lgpd-banner-content,
.lgpd-banner.style-modal .lgpd-banner-content {
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.lgpd-banner-text {
    margin-bottom: 16px;
}

.lgpd-banner-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--lgpd-btn-accept, #10b981);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lgpd-banner-message {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.lgpd-banner-message a {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

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

/* Botões do Banner - Estilo Compacto */
.lgpd-banner-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.lgpd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
    background: #fff;
    color: #374151;
}

.lgpd-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.lgpd-btn:active {
    transform: scale(0.98);
}

.lgpd-btn-accept {
    background: var(--lgpd-btn-accept, #10b981);
    border-color: var(--lgpd-btn-accept, #10b981);
    color: #fff;
}

.lgpd-btn-accept:hover {
    filter: brightness(0.9);
}

.lgpd-btn-reject {
    background: var(--lgpd-btn-reject, #fff);
    border: 1px solid #e5e7eb;
    color: var(--lgpd-bg, #fff);
}

.lgpd-btn-reject:hover {
    filter: brightness(0.95);
}

.lgpd-btn-settings {
    background: transparent !important;
    border: none !important;
    color: #9ca3af !important;
    padding: 8px 12px;
    font-size: 12px;
}

.lgpd-btn-settings:hover {
    color: #6b7280 !important;
    background: transparent !important;
}

/* ==========================================
   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.5);
    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: 12px;
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

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

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

.lgpd-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.lgpd-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
    transition: color 0.15s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.lgpd-modal-close:hover {
    color: #374151;
    background: #f3f4f6;
}

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

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

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

.lgpd-modal-category {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 12px 16px;
    transition: border-color 0.15s ease;
}

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

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

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

.lgpd-modal-category-name {
    font-weight: 500;
    font-size: 13px;
    color: #111827;
    margin-bottom: 2px;
}

.lgpd-modal-category-desc {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

/* Toggle Switch - Compacto */
.lgpd-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    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: #e5e7eb;
    transition: 0.2s;
    border-radius: 22px;
}

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

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

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

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

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

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

/* Footer do Modal */
.lgpd-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: #fafafa;
}

.lgpd-modal-footer .lgpd-btn {
    padding: 8px 20px;
}

/* ==========================================
   BOTÃO FLUTUANTE - Pequeno e Discreto
   ========================================== */

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

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

.lgpd-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

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

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

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

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

@media (max-width: 768px) {
    .lgpd-banner.position-bottom,
    .lgpd-banner.position-top,
    .lgpd-banner.position-bottom-left,
    .lgpd-banner.position-bottom-right {
        left: 12px;
        right: 12px;
        max-width: none;
        bottom: 12px;
    }
    
    .lgpd-banner-content {
        padding: 16px 20px;
    }
    
    .lgpd-banner-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .lgpd-btn {
        width: 100%;
        justify-content: center;
    }
    
    .lgpd-modal-content {
        max-height: 90vh;
        margin: 10px;
    }
    
    .lgpd-modal-footer {
        flex-direction: column;
    }
    
    .lgpd-modal-footer .lgpd-btn {
        width: 100%;
    }
    
    .lgpd-float-btn {
        bottom: 12px;
    }
    
    .lgpd-float-btn.position-left {
        left: 12px;
    }
    
    .lgpd-float-btn.position-right {
        right: 12px;
    }
}

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

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

/* Preferência de movimento reduzido */
@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;
    }
}

/* ==========================================
   IMPRESSÃO
   ========================================== */

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