/* Sistema de Gerenciamento de Cookies - SGT */

/* Banner de Cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    color: #f8fafc;
    padding: 1.5rem;
    z-index: 10000;
    border-top: 3px solid #2563eb;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

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

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.cookie-text a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-text a:hover {
    color: #3b82f6;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #2563eb;
    color: white;
}

.cookie-btn-accept:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

.cookie-btn-necessary {
    background: transparent;
    color: #f8fafc;
    border: 2px solid #64748b;
}

.cookie-btn-necessary:hover {
    background: #64748b;
    color: white;
}

.cookie-btn-settings {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
}

.cookie-btn-settings:hover {
    background: #2563eb;
    color: white;
}

/* Modal de Configurações */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #2563eb;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #475569;
    padding-bottom: 1rem;
}

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

.cookie-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: #374151;
    color: #f8fafc;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category-title {
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.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-color: #64748b;
    transition: 0.4s;
    border-radius: 24px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #2563eb;
}

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

.cookie-toggle.disabled .cookie-toggle-slider {
    background-color: #374151;
    cursor: not-allowed;
}

.cookie-toggle.disabled .cookie-toggle-slider:before {
    background-color: #9ca3af;
}

.cookie-category-description {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.cookie-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #475569;
}

/* Responsividade */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .cookie-modal {
        padding: 1rem;
    }
    
    .cookie-modal-content {
        padding: 1.5rem;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content {
        gap: 1rem;
    }
    
    .cookie-text {
        min-width: auto;
    }
    
    .cookie-text p {
        font-size: 0.9rem;
    }
    
    .cookie-btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .cookie-modal-title {
        font-size: 1.25rem;
    }
}

/* Animações */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.cookie-banner.show {
    animation: slideUp 0.4s ease-out;
}

.cookie-modal.show {
    animation: fadeIn 0.3s ease-out;
}

/* Status de consentimento para desenvolvedores */
.cookie-consent-debug {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 9999;
    display: none;
}

.cookie-consent-debug.show {
    display: block;
}