/* ===================================================
   FORMS.CSS — Estilos de formulários + calendário
   =================================================== */

/* ---------- Grupos de formulário ---------- */
.form__group,
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form__label,
.form-label {
    margin-bottom: .4rem;
    font-weight: 500;
    color: var(--text-color, #111827);
}

/* ---------- Campos de texto / select ---------- */
.form__control,
.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: .5rem .6rem;
    border-radius: .375rem;
    border: 1px solid #d1d5db;
    font-size: .95rem;
    background-color: #ffffff;
    color: #111827;
    transition: all 0.2s ease;
}

.form__control:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,.25);
}

/* Tema escuro */
[data-theme="dark"] .form__control,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #334155;
}

[data-theme="dark"] .form__control:focus,
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.25);
}

/* ---------- Checkbox / radio ---------- */
.form-check {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .3rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: #2563eb;
}

.form-check-label {
    font-size: .9rem;
    color: var(--text-color, #111827);
}

[data-theme="dark"] .form-check-label {
    color: #e5e7eb;
}

/* ---------- Botões em formulários ---------- */
.btn-form {
    width: 100%;
    margin-top: .25rem;
    padding: .55rem .75rem;
    font-size: .9rem;
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: .4rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-form:hover {
    background-color: #1d4ed8;
}

[data-theme="dark"] .btn-form {
    background-color: #3b82f6;
}

[data-theme="dark"] .btn-form:hover {
    background-color: #2563eb;
}

/* ---------- Mensagens de validação simples ---------- */
.form-text {
    font-size: .8rem;
    color: #6b7280;
}

[data-theme="dark"] .form-text {
    color: #9ca3af;
}

/* ===================================================
   CALENDÁRIO ESCOLAR — legendas e editor
   =================================================== */

.calendar-wrapper table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-wrapper th,
.calendar-wrapper td {
    text-align: center;
    vertical-align: middle;
    padding: .35rem;
    border: 1px solid #e5e7eb;
    height: 46px;
    font-size: .85rem;
    background-color: #ffffff;
    color: #111827;
    transition: background 0.3s;
}

.calendar-wrapper th {
    font-weight: 600;
    background-color: #f9fafb;
}

.calendar-wrapper td:hover {
    background-color: #eff6ff;
}

/* Tema escuro */
[data-theme="dark"] .calendar-wrapper th,
[data-theme="dark"] .calendar-wrapper td {
    background-color: #0f172a;
    border-color: #1f2937;
    color: #e5e7eb;
}

[data-theme="dark"] .calendar-wrapper th {
    background-color: #1e293b;
}

[data-theme="dark"] .calendar-wrapper td:hover {
    background-color: #1e3a8a;
}

/* ---------- Quadradinhos de legenda ---------- */
.calendar-badge {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,.15);
}

/* Paleta de cores — idêntica à usada no calendário */
.bg-feriado          { background-color: #ef4444; } /* FERIADO */
.bg-inicio-ano       { background-color: #06b6d4; } /* INICIO_ANO */
.bg-semana-ped       { background-color: #facc15; } /* SEMANA_PEDAGOGICA */
.bg-inicio-bim       { background-color: #1e3a8a; } /* INICIO_AULAS */
.bg-trab-coletivo    { background-color: #b45309; } /* TRABALHO_COLETIVO */
.bg-recesso          { background-color: #84cc16; } /* RECESSO */
.bg-provas           { background-color: #f97316; } /* PROVAS */
.bg-conselho         { background-color: #ec4899; } /* CONSELHO */
.bg-reuniao          { background-color: #a855f7; } /* REUNIAO */
.bg-ferias-escolares { background-color: #9ca3af; } /* FERIAS */
.bg-espectro         { background-color: #3b82f6; } /* ESPECTRO_AUTISTA */
.bg-final-ano        { background-color: #22c1c3; } /* FIM_ANO */

/* ---------- Ajustes finos do editor do calendário ---------- */
#editorDiaCard .form-label {
    font-size: .9rem;
}

#editorDiaCard input[type="text"] {
    font-size: .9rem;
}

.row .form-control,
.row .form-select {
    width: 100%;
}

/* ===================================================
   RESPONSIVO
   =================================================== */
@media (max-width: 768px) {
    .calendar-wrapper th,
    .calendar-wrapper td {
        font-size: .8rem;
        padding: .3rem;
    }
}
