/* ============================================================
   Form Styles
   Used by: Views/Families/Create.cshtml and future form pages
   ============================================================ */

/* ── Form card wrapper ── */
.enr-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
}

/* ── Section headers within the form ── */
.enr-form-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #64748b;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

/* ── Progressive disclosure: hidden steps ── */
.enr-step {
    transition: opacity 0.2s ease;
}

    .enr-step.enr-hidden {
        display: none;
    }

/* ── BJ Fogg nudge text ── */
.enr-nudge {
    font-size: 0.8125rem;
    font-style: italic;
    color: #7C3AED;
    margin-top: 4px;
    display: block;
}

/* ── Eligibility badge panel (revealed after DOB entry) ── */
.enr-eligibility-panel {
    background: #F5F3FF;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .enr-eligibility-panel.enr-hidden {
        display: none;
    }

.enr-cohort-badge {
    font-family: var(--bs-font-monospace);
    font-weight: 500;
    font-size: 0.8125rem;
    background-color: #EEF2FF;
    color: #4F46E5;
    border-radius: 6px;
    padding: 3px 10px;
    white-space: nowrap;
}

.enr-entry-grade-label {
    font-size: 0.875rem;
    color: #334155;
    font-weight: 500;
}

.enr-nurture-stage {
    font-size: 0.75rem;
    color: #64748b;
    margin-left: auto;
}

/* ── Optional / advanced section toggle ── */
.enr-optional-toggle {
    font-size: 0.8125rem;
    color: #4F46E5;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

    .enr-optional-toggle:hover {
        color: #4338ca;
        text-decoration: underline;
    }

/* ── Child form card ── */
.enr-child-card {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    margin-top: 8px;
}

/* ── Child section wrapper (one per child, stacked) ── */
.enr-child-section {
    margin-top: 12px;
}

    .enr-child-section:first-child {
        margin-top: 0;
    }

/* ── Child section header: "Child N" label + Remove button ── */
.enr-child-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.enr-child-section-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

.enr-remove-child-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .enr-remove-child-btn:hover:not(:disabled) {
        color: #EF4444;
        background-color: #FEF2F2;
    }

    .enr-remove-child-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

/* ── Sibling relationship section ── */
.enr-sibling-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #374151;
}

    .enr-sibling-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.enr-sibling-name {
    font-weight: 600;
    color: #1e293b;
}

.enr-sibling-rel-select {
    width: auto;
    min-width: 130px;
}

/* ── Add Child button ── */
.enr-add-child-btn {
    border: 1.5px dashed #94a3b8;
    background: #ffffff;
    color: #64748b;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.15s, color 0.15s;
}

    .enr-add-child-btn:hover {
        border-color: #4F46E5;
        color: #4F46E5;
    }

/* ── Star rating ── */
.enr-star-rating {
    display: flex;
    gap: 4px;
    align-items: center;
}

    .enr-star-rating input[type="radio"] {
        display: none;
    }

    .enr-star-rating label {
        font-size: 1.25rem;
        color: #cbd5e1;
        cursor: pointer;
        transition: color 0.1s;
        line-height: 1;
    }

        .enr-star-rating input[type="radio"]:checked ~ label,
        .enr-star-rating label:hover,
        .enr-star-rating label:hover ~ label {
            color: #F59E0B;
        }

    .enr-star-rating:hover label {
        color: #F59E0B;
    }

    .enr-star-rating label:hover ~ label {
        color: #cbd5e1;
    }

/* ── Advanced Filter Offcanvas Panel ── */

.enr-filter-offcanvas {
    width: 420px;
}

.enr-filter-panel-body {
    overflow-y: auto;
    padding-bottom: 0;
}

.enr-filter-hint {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 16px;
}

.enr-filter-panel-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    flex-shrink: 0;
}

.enr-filter-apply-btn {
    flex: 1;
}

/* ── Filter group ── */

.enr-filter-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.enr-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.enr-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.enr-remove-group {
    font-size: 0.75rem;
    color: #94a3b8;
    padding: 0;
}

    .enr-remove-group:hover {
        color: #EF4444;
    }

.enr-group-conditions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.enr-add-condition-btn {
    font-size: 0.8125rem;
    color: #4F46E5;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .enr-add-condition-btn:hover {
        color: #4338ca;
    }

/* ── OR divider between groups ── */

.enr-or-divider {
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin: 4px 0;
}

/* ── Add Group button ── */

.enr-add-group-btn {
    font-size: 0.8125rem;
    color: #64748b;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

    .enr-add-group-btn:hover {
        color: #4F46E5;
    }

/* ── Filter condition row ── */

.enr-filter-condition {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.enr-condition-field,
.enr-condition-operator {
    flex: 1;
    min-width: 110px;
    max-width: 160px;
}

.enr-condition-value-wrap {
    flex: 1;
    min-width: 120px;
}

/* ── Remove condition button ── */

.enr-remove-condition {
    color: #94a3b8;
    padding: 3px 6px;
    border-color: transparent;
    flex-shrink: 0;
}

    .enr-remove-condition:hover {
        color: #EF4444;
        border-color: #FECACA;
        background: #FEF2F2;
    }

/* ── Enum / tag checkbox list inside a condition ── */

.enr-condition-checks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 140px;
    overflow-y: auto;
    padding: 6px 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.enr-condition-check-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
}

    .enr-condition-check-item:hover {
        color: #0f172a;
    }

/* ── Rating number input ── */

.enr-condition-number {
    max-width: 80px;
}

/* ── Tag color dot in filter panel tag list ── */

.enr-tag-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 5px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.08);
}

/* ── Hint text inside condition value area ── */

.enr-condition-hint {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-style: italic;
    padding: 4px 0;
}

/* ── Form footer (sticky Save button area) ── */
.enr-form-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}