/* CSS para o Banner de Cookies (LGPD) */

:root {
    --cookie-bg: #ffffff;
    --cookie-text: #333333;
    --cookie-border: #e2e8f0;
    --cookie-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    --cookie-primary: #3730a3;
    /* Azul Sião */
    --cookie-primary-hover: #312e81;
    --cookie-secondary: #f1f5f9;
    --cookie-secondary-hover: #e2e8f0;
    --cookie-font-family: 'Montserrat', sans-serif;
}

/* Banner Fixo no Rodapé */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--cookie-bg);
    color: var(--cookie-text);
    padding: 1.5rem;
    box-shadow: var(--cookie-shadow);
    z-index: 9999;
    display: none;
    /* Oculto por padrão, ativado via JS */
    font-family: var(--cookie-font-family);
    border-top: 1px solid var(--cookie-border);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-content {
    flex: 1;
    min-width: 300px;
}

.cookie-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--cookie-primary);
}

.cookie-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4b5563;
}

.cookie-link {
    color: var(--cookie-primary);
    text-decoration: underline;
    cursor: pointer;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Botões */
.cookie-btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.cookie-btn-accept {
    background-color: var(--cookie-primary);
    color: white;
}

.cookie-btn-accept:hover {
    background-color: var(--cookie-primary-hover);
}

.cookie-btn-reject {
    background-color: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
}

.cookie-btn-reject:hover {
    background-color: #f8fafc;
    color: #334155;
    border-color: #94a3b8;
}

.cookie-btn-manage {
    background-color: var(--cookie-secondary);
    color: #475569;
}

.cookie-btn-manage:hover {
    background-color: var(--cookie-secondary-hover);
}

/* Modal de Preferências */
#cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.cookie-modal-content {
    background-color: white;
    width: 90%;
    max-width: 600px;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    font-family: var(--cookie-font-family);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

.cookie-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cookie-primary);
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
}

.cookie-modal-close:hover {
    color: #475569;
}

.cookie-option {
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 0.5rem;
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-option-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
}

.cookie-option-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.cookie-slider {
    background-color: var(--cookie-primary);
}

input:focus+.cookie-slider {
    box-shadow: 0 0 1px var(--cookie-primary);
}

input:checked+.cookie-slider:before {
    transform: translateX(20px);
}

input:disabled+.cookie-slider {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #94a3b8;
}

.cookie-modal-actions {
    margin-top: 2rem;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

@media (max-width: 640px) {
    .cookie-container {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}