/* 
 * Estilos do Sistema de Gestão de Cookies
 * Responsivo e customizável
 */

/* Banner de Cookies */
.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    background: #fff;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-consent-banner.position-top {
    top: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.cookie-consent-banner.position-bottom {
    bottom: 0;
}

.cookie-consent-banner.position-center {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    max-width: 600px;
    border-radius: 12px;
    animation: fadeIn 0.5s ease-out;
}

/* Tema Escuro */
.cookie-consent-banner.theme-dark {
    background: #1a1a1a;
    color: #fff;
}

.cookie-consent-banner.theme-dark h3 {
    color: #fff;
}

.cookie-consent-banner.theme-dark p {
    color: #ccc;
}

/* Conteúdo do Banner */
.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Botões */
.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #2c5282;
    color: white;
}

.cookie-btn-accept:hover {
    background: #1e3a5f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cookie-btn-reject {
    background: #6c757d;
    color: white;
}

.cookie-btn-reject:hover {
    background: #5a6268;
}

.cookie-btn-settings {
    background: transparent;
    color: #2c5282;
    border: 2px solid #2c5282;
}

.cookie-btn-settings:hover {
    background: #2c5282;
    color: white;
}

.cookie-btn-secondary {
    background: #e9ecef;
    color: #333;
}

.cookie-btn-secondary:hover {
    background: #dee2e6;
}

/* Modal de Configurações */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cookie-modal-header {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.cookie-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.cookie-close:hover {
    color: #333;
}

.cookie-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-body > p {
    margin: 0 0 20px 0;
    color: #666;
}

.cookie-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Categorias de Cookies */
.cookie-category {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cookie-category-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.cookie-category-header h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.category-description {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.required-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #dc3545;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Switch Toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(24px);
}

.cookie-switch input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Lista de Cookies */
.cookies-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.cookie-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
}

.cookie-item:last-child {
    margin-bottom: 0;
}

.cookie-item strong {
    display: block;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.cookie-item p {
    margin: 4px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.cookie-item small {
    display: block;
    margin-top: 4px;
    color: #999;
    font-size: 12px;
}

/* Animações */
@keyframes slideIn {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    
    .cookie-banner-actions {
        justify-content: stretch;
    }
    
    .cookie-btn {
        flex: 1;
        text-align: center;
    }
    
    .cookie-consent-banner.position-center {
        top: 0;
        left: 0;
        transform: none;
        max-width: 100%;
        border-radius: 0;
    }
    
    .cookie-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .cookie-banner-text h3 {
        font-size: 16px;
    }
    
    .cookie-banner-text p {
        font-size: 13px;
    }
    
    .cookie-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .cookie-modal-header h2 {
        font-size: 20px;
    }
}

/* Acessibilidade */
.cookie-btn:focus,
.cookie-close:focus,
.cookie-switch input:focus + .cookie-slider {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Impressão */
@media print {
    .cookie-consent-banner,
    .cookie-modal {
        display: none !important;
    }
}
