/* ================================================= */
/* ⚙️ Modal de Configuração (.env) — modal-configuracao.css */
/* ================================================= */

/* 1. ESTILO DO OVERLAY (Fundo e Sobreposição) */
#modal-configuracao {
    /* Herda o comportamento de sobreposição do modal-tema */
    position: fixed;
    inset: 0; /* Cobre 100% da tela */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 1000; /* Garante que fique acima de tudo */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#modal-configuracao.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 2. ESTILO DO CONTEÚDO PRINCIPAL (A caixa branca) */
.modal-conteudo {
    /* Estilo base, ajustado para ser mais amplo */
    background-color: var(--cor-painel, #fff);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: fadeInScale 0.25s ease;
    text-align: left; /* Alinhamento para formulário, diferente do modal-tema */
    
    /* Configuração 'grande' herdada do seu HTML anterior */
    width: 600px; 
    max-height: 80vh; 
    overflow-y: auto; /* Permite rolar se houver muitas variáveis */
}

/* Título */
.modal-conteudo h2 {
    margin-bottom: 1.5rem;
    color: var(--color-primary, #1C743C);
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center; /* Centraliza apenas o título */
}

/* 3. ESTILOS ESPECÍFICOS PARA O FORMULÁRIO (.env) */
.lista-configuracao {
    margin-top: 10px;
}

.item-env {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px; /* Aumenta o espaçamento */
}

.item-env label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 4px;
}

.item-env input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.item-env input:focus {
    outline: none;
    border-color: var(--color-primary, #1C743C);
    box-shadow: 0 0 0 2px rgba(28, 116, 60, 0.2);
}

/* 4. ESTILOS DAS AÇÕES (Botões) */
.modal-acoes {
    display: flex;
    justify-content: center; /* Alinha os botões no centro */
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.modal-acoes button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-salvar {
    background-color: var(--color-primary, #1C743C);
    color: white;
}

.btn-salvar:hover {
    background-color: #165b30; /* Tonalidade mais escura */
    transform: translateY(-1px);
}

.btn-fechar {
    background-color: #ddd;
    color: #555;
}

.btn-fechar:hover {
    background-color: #ccc;
}

/* 5. ANIMAÇÃO (Reutiliza a animação do modal-tema) */
@keyframes fadeInScale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 6. RESPONSIVIDADE */
@media (max-width: 650px) {
    .modal-conteudo {
        width: 95%;
        padding: 1rem;
    }
    .modal-acoes {
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .modal-acoes button {
        flex-grow: 1;
    }
}