/* Utilweb: Estilos para o Calendário de Fertilidade v5.1 (Design Final) */

/* PALETA DE CORES */
:root {
    --cor-menstruacao-fundo: #E53935;
    --cor-menstruacao-texto: #FFFFFF;
    --cor-fertil-fundo: #03A9F4;
    --cor-fertil-texto: #FFFFFF;
    --cor-ovulacao-fundo: #76FF03;
    --cor-ovulacao-texto: #000000;
    --cor-hoje-fundo: #37474F; /* === NOVO: Fundo cinza escuro para 'Hoje' === */
    --cor-hoje-texto: var(--primary-color); /* === NOVO: Texto com a cor primária === */
}

/* ESTRUTURA E PAINEL DE CONTROLE */
.calendario-container { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: flex-start; }
.interface-wrapper { display: flex; flex-direction: column; gap: 25px; position: sticky; top: 90px; }
.painel-controle { background-color: var(--background-light); border: 1px solid var(--border-color); border-radius: 8px; padding: 25px; }
.form-step { margin-bottom: 25px; }
.form-step:last-child { margin-bottom: 0; }
.step-title { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; margin: 0 0 8px 0; }
.step-number { background-color: var(--primary-color); color: #fff; border-radius: 50%; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.step-description { font-size: 0.9rem; color: var(--text-secondary-light); margin: 0 0 12px 0; line-height: 1.5; }
.date-input-container { position: relative; }
.clear-date-btn { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); background: none; border: none; font-size: 1.8rem; line-height: 1; color: var(--text-secondary-light); cursor: pointer; padding: 0 5px; transition: color 0.2s ease; }
.clear-date-btn:hover { color: var(--text-primary-light); }

/* RESUMO */
.results-summary-wrapper { background-color: var(--card-background-light); border: 1px solid var(--border-color); border-radius: 8px; padding: 25px; animation: fadeIn 0.5s ease-in-out; }
.results-summary-wrapper h3 { margin: 0 0 15px 0; }
.summary-item { font-size: 0.95rem; padding: 12px 0; border-bottom: 1px solid var(--border-color); line-height: 1.6; }
.summary-item:last-child { border-bottom: none; }
.summary-item strong { color: var(--text-primary-light); }
.summary-item .date-highlight { color: var(--primary-color); font-weight: 600; }

/* LEGENDA */
.legenda { background-color: var(--background-light); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; }
.legenda h4 { margin: 0 0 15px 0; font-size: 1.1rem; }
.legenda-item { display: flex; align-items: center; margin-bottom: 8px; font-size: 0.9rem; }
.cor-legenda { width: 15px; height: 15px; border-radius: 4px; margin-right: 10px; }
.cor-legenda.hoje-fundo { background-color: var(--cor-hoje-fundo); }

/* CALENDÁRIO */
.calendario-wrapper { border-radius: 12px; padding: 0; background-color: var(--card-background-light); box-shadow: 0 8px 24px rgba(0,0,0,0.08); overflow: hidden; }
.calendario-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 10px; background-color: var(--background-light); border-bottom: 1px solid var(--border-color); }
.calendario-header h3 { margin: 0; text-align: center; flex-grow: 1; font-size: 1.2rem; }
.btn-nav-calendario { background: none; border: 1px solid transparent; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 1.4rem; color: var(--text-secondary-light); transition: all 0.2s ease; }
.btn-nav-calendario:hover { background-color: var(--border-color); color: var(--primary-color); }
.calendario-grid-container { padding: 15px; }
.calendario-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dias-semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 8px; }
.dia-semana { text-align: center; font-weight: 600; font-size: 0.8rem; color: var(--text-secondary-light); padding-bottom: 5px; }

.dia {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-secondary-light);
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border: 2px solid transparent;
    font-weight: 700;
}
.dia.mes-atual { color: var(--text-primary-light); }

/* === NOVO ESTILO PARA 'HOJE' === */
.dia.hoje {
    background-color: var(--cor-hoje-fundo);
    color: var(--cor-hoje-texto) !important;
    border-color: var(--primary-color);
}

/* PALETA DE CORES DO CALENDÁRIO */
.cor-legenda.menstruacao { background-color: var(--cor-menstruacao-fundo); }
.cor-legenda.fertil { background-color: var(--cor-fertil-fundo); }
.cor-legenda.ovulacao { background-color: var(--cor-ovulacao-fundo); }
.dia.menstruacao { background-color: var(--cor-menstruacao-fundo); color: var(--cor-menstruacao-texto) !important; border-color: transparent; }
.dia.fertil { background-color: var(--cor-fertil-fundo); color: var(--cor-fertil-texto) !important; border-color: transparent; }
.dia.ovulacao { background-color: var(--cor-ovulacao-fundo); color: var(--cor-ovulacao-texto) !important; transform: scale(1.05); box-shadow: 0 0 10px rgba(0,0,0,0.2); border-color: rgba(0,0,0,0.2); }
/* Prioridade para 'Hoje' não ser sobrescrito se coincidir com outra data */
.dia.hoje.menstruacao, .dia.hoje.fertil, .dia.hoje.ovulacao {
    background-color: var(--cor-hoje-fundo);
    color: var(--cor-hoje-texto) !important;
    border-color: var(--primary-color);
}


/* DARK MODE */
body.dark-mode {
    --cor-menstruacao-fundo: #D32F2F;
    --cor-fertil-fundo: #0288D1;
    --cor-ovulacao-fundo: #64DD17;
    --cor-ovulacao-texto: #000000;
    --cor-hoje-fundo: #78909C;
    --cor-hoje-texto: #FFFFFF;
}
body.dark-mode .painel-controle,
body.dark-mode .legenda { background-color: #1a242b; }
body.dark-mode .calendario-wrapper { background-color: var(--card-background-dark); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
body.dark-mode .calendario-header { background-color: #1a242b; }

/* RESPONSIVIDADE */
@media (max-width: 900px) {
    .calendario-container { grid-template-columns: 1fr; }
    .interface-wrapper { position: static; margin-bottom: 30px; }
}
