/* ==========================================================================
   YAZHI — FORMS (contact, application wizard, admin forms)
   ========================================================================== */

.form-field { margin-bottom: var(--space-sm); }
.form-field label,
.form-field legend {
    display: block;
    font-weight: 700;
    font-size: var(--fs-sm);
    margin-bottom: 0.45em;
    color: var(--color-heading);
}
.form-field .required { color: var(--color-danger); }
.form-field .hint { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 0.35em; }

.form-control {
    width: 100%;
    padding: 0.85em 1em;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--yazhi-white);
    font-size: var(--fs-base);
    min-height: 48px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea.form-control { min-height: 120px; resize: vertical; }
.form-control:focus {
    outline: none;
    border-color: var(--yazhi-burgundy);
    box-shadow: 0 0 0 3px rgba(110,23,39,0.12);
}
.form-control[aria-invalid="true"] { border-color: var(--color-danger); }
.field-error { color: var(--color-danger); font-size: var(--fs-xs); margin-top: 0.35em; display: none; }
.field-error.is-visible { display: block; }

.form-row { display: grid; gap: var(--space-sm); grid-template-columns: 1fr; }
@media (min-width: 640px) {
    .form-row--2 { grid-template-columns: 1fr 1fr; }
    .form-row--3 { grid-template-columns: repeat(3, 1fr); }
}

.checkbox-field, .radio-field {
    display: flex;
    align-items: flex-start;
    gap: 0.65em;
    font-size: var(--fs-sm);
    margin-bottom: 0.6em;
}
.checkbox-field input, .radio-field input { margin-top: 0.25em; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--yazhi-burgundy); }

.checkbox-grid { display: grid; grid-template-columns: 1fr; gap: 0.5em; }
@media (min-width: 560px) { .checkbox-grid { grid-template-columns: 1fr 1fr; } }

fieldset { border: none; padding: 0; margin: 0 0 var(--space-md); }

/* File upload */
.file-drop {
    border: 1.5px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    background: var(--yazhi-ivory);
}
.file-drop input[type="file"] { margin-top: 0.6em; }
.file-drop small { display: block; color: var(--color-text-muted); margin-top: 0.4em; }

/* ---- Multi-step application wizard ---- */
.wizard-progress { margin-bottom: var(--space-lg); }
.wizard-progress__track {
    height: 6px;
    background: var(--yazhi-light-gray);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.wizard-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--yazhi-gold), var(--yazhi-dark-gold));
    transition: width var(--transition-slow);
}
.wizard-progress__label {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    margin-top: 0.6em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wizard-progress__dots { display: none; }
@media (min-width: 860px) {
    .wizard-progress__dots {
        display: flex;
        justify-content: space-between;
        margin-top: var(--space-sm);
        flex-wrap: wrap;
        gap: 0.5em;
    }
    .wizard-progress__dot {
        display: flex;
        align-items: center;
        gap: 0.5em;
        font-size: var(--fs-xs);
        color: var(--color-text-muted);
    }
    .wizard-progress__dot .num {
        width: 22px; height: 22px;
        border-radius: 50%;
        border: 1.5px solid var(--color-border);
        display: flex; align-items: center; justify-content: center;
        font-weight: 700;
    }
    .wizard-progress__dot.is-active .num,
    .wizard-progress__dot.is-done .num {
        background: var(--yazhi-burgundy);
        border-color: var(--yazhi-burgundy);
        color: var(--yazhi-ivory);
    }
    .wizard-progress__dot.is-active { color: var(--yazhi-burgundy); font-weight: 700; }
}

.wizard-step { display: none; }
.wizard-step.is-active { display: block; animation: yazhi-fade-up 0.35s var(--ease); }
.wizard-step__title { margin-bottom: 0.2em; }
.wizard-step__desc { color: var(--color-text-muted); margin-bottom: var(--space-md); }

.wizard-nav { display: flex; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-border); }

.review-block { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); margin-bottom: var(--space-sm); background: var(--yazhi-white); }
.review-block__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6em; }
.review-block__head h4 { margin: 0; }
.review-block dl { display: grid; grid-template-columns: 1fr; gap: 0.5em; margin: 0; }
@media (min-width: 640px) { .review-block dl { grid-template-columns: 1fr 1fr; } }
.review-block dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin: 0; }
.review-block dd { margin: 0.1em 0 0; font-size: var(--fs-sm); }
