/* ════════════════════════════════════════════
   Moh3nForm — Public CSS  (minimal + iconic)
   ════════════════════════════════════════════ */

/* ── Wrapper ── */
.mf-form-wrapper {
    max-width: 680px;
    margin: 32px auto;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Form header card ── */
.mf-form-header-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.mf-form-header-icon { flex-shrink: 0; margin-top: 2px; }
.mf-form-header-text { flex: 1; }
.mf-form-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.4;
}
.mf-form-description {
    margin: 0;
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.65;
}

/* ── Success ── */
.mf-success-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 14px;
    padding: 20px 22px;
}
.mf-success-icon { flex-shrink: 0; }
.mf-success-body { display: flex; flex-direction: column; gap: 4px; }
.mf-success-body strong { font-size: 15px; color: #166534; }
.mf-success-body span   { font-size: 13px; color: #15803d; }

/* ── Errors ── */
.mf-errors {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 10px;
    padding: 14px 18px;
    color: #991b1b;
    font-size: 13.5px;
}
.mf-errors-icon { flex-shrink: 0; font-size: 18px; }
.mf-errors ul { margin: 0; padding-right: 18px; }
.mf-errors li { margin-bottom: 4px; }

/* ── Form ── */
.mf-form { display: flex; flex-direction: column; gap: 18px; }

/* ════════════════════════════════════════════
   Progress wrap
   ════════════════════════════════════════════ */
.mf-progress-wrap {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mf-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.mf-progress-section {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
}
.mf-section-icon {
    flex-shrink: 0;
    color: #2271b1;
    display: flex;
    align-items: center;
}
.mf-section-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mf-progress-counter {
    display: flex;
    align-items: baseline;
    gap: 3px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: #2271b1;
}
.mf-current-step { font-size: 17px; line-height: 1; }
.mf-progress-sep { color: #94a3b8; font-weight: 400; }
.mf-total-steps  { color: #94a3b8; }
.mf-progress { width: 100%; }
.mf-progress-track {
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.mf-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2271b1 0%, #60a5fa 100%);
    border-radius: 99px;
    transition: width .45s cubic-bezier(.4,0,.2,1);
}
.mf-progress-pct {
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    gap: 3px;
    align-items: center;
}
.mf-pct-num { font-weight: 700; color: #2271b1; font-size: 13px; }

/* ════════════════════════════════════════════
   Field
   ════════════════════════════════════════════ */
.mf-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mf-field > label {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.5;
}
.mf-required { color: #ef4444; margin-right: 2px; }
.mf-hint { margin: 2px 0 0; font-size: 12px; color: #94a3b8; }

.mf-field input:not([type="checkbox"]):not([type="radio"]),
.mf-field textarea,
.mf-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fafafa;
    color: #1d2327;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.mf-field input:focus,
.mf-field textarea:focus,
.mf-field select:focus {
    outline: none;
    border-color: #2271b1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(34,113,177,.1);
}
.mf-field textarea { resize: vertical; min-height: 100px; }
.mf-multiselect { min-height: 110px; }

/* ── Radio / Checkbox group ── */
.mf-radio-group,
.mf-checkbox-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.mf-radio-group.mf-layout-vertical,
.mf-checkbox-group.mf-layout-vertical { flex-direction: column; gap: 7px; }
.mf-radio-group.mf-layout-horizontal,
.mf-checkbox-group.mf-layout-horizontal { flex-direction: row; }

.mf-radio-label,
.mf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    padding: 9px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 13.5px;
    background: #fafafa;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.mf-radio-label:hover,
.mf-checkbox-label:hover { border-color: #2271b1; background: #f0f6fc; }
.mf-radio-label input[type="radio"],
.mf-checkbox-label input[type="checkbox"] {
    accent-color: #2271b1;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
/* Single boolean checkbox */
.mf-field-checkbox .mf-checkbox-label { border: none; padding: 0; background: none; }

/* ── Single-select cards ── */
.mf-single-select-cards { display: flex; flex-direction: column; gap: 8px; }
.mf-card-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 11px;
    cursor: pointer;
    background: #fafafa;
    transition: border-color .15s, background .15s, box-shadow .15s;
    position: relative;
}
.mf-card-option:hover { border-color: #2271b1; background: #f0f6fc; }
.mf-card-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
/* Custom radio dot via pseudo */
.mf-card-option::before {
    content: '';
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    background: #fff;
    transition: border-color .15s;
}
.mf-card-option.is-selected::before,
.mf-card-option:has(.mf-card-radio:checked)::before {
    border-color: #2271b1;
    background: #2271b1;
    box-shadow: inset 0 0 0 3px #fff;
}
.mf-card-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    flex: 1;
}
.mf-card-option.is-selected,
.mf-card-option:has(.mf-card-radio:checked) {
    border-color: #2271b1;
    background: #eef5fd;
    box-shadow: 0 0 0 3px rgba(34,113,177,.08);
}
.mf-card-option.is-selected .mf-card-label { color: #1d4ed8; font-weight: 600; }
.mf-card-option:focus-within { outline: 2px solid #2271b1; outline-offset: 2px; }

/* ── Step nav ── */
.mf-step-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 4px;
}
.mf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 9px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: background .15s, box-shadow .15s;
    line-height: 1;
}
.mf-btn-next, .mf-btn-submit { background: #2271b1; color: #fff; }
.mf-btn-next:hover, .mf-btn-submit:hover {
    background: #1a5f97;
    box-shadow: 0 2px 8px rgba(34,113,177,.25);
}
.mf-btn-prev { background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0; }
.mf-btn-prev:hover { background: #e2e8f0; }
.mf-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Other input ── */
.mf-other-input-wrap { display: none; margin-top: 8px; }
.mf-other-input-wrap.mf-other-visible {
    display: block;
    animation: mfOtherIn .18s ease;
}
@keyframes mfOtherIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mf-other-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px dashed #93c5fd;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #eff6ff;
    color: #1d2327;
    transition: border-color .15s, background .15s;
}
.mf-other-input:focus {
    outline: none;
    border-style: solid;
    border-color: #2271b1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(34,113,177,.1);
}
.mf-other-input::placeholder { color: #93c5fd; }

/* Other option dashed */
.mf-radio-label.mf-radio-other,
.mf-checkbox-label.mf-checkbox-other {
    border-style: dashed;
    border-color: #93c5fd;
    color: #2271b1;
    background: #f0f9ff;
}
.mf-card-option.mf-card-other {
    border-style: dashed;
    border-color: #93c5fd;
    background: #f0f9ff;
}
.mf-card-option.mf-card-other .mf-card-label { color: #2271b1; }

/* ── Divider (non-multistep) ── */
.mf-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
    color: #94a3b8;
}
.mf-divider::before,
.mf-divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.mf-divider-title { font-size: 12px; white-space: nowrap; font-weight: 600; color: #94a3b8; }

/* ── Validation ── */
.mf-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239,68,68,.12) !important;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .mf-form-wrapper { margin: 16px 12px; }
    .mf-form-header-card { padding: 14px 16px; }
    .mf-radio-group.mf-layout-horizontal,
    .mf-checkbox-group.mf-layout-horizontal { flex-direction: column; }
    .mf-step-nav { flex-direction: column; align-items: stretch; }
    .mf-btn { width: 100%; justify-content: center; }
    .mf-section-text { font-size: 11px; }
}
