/* ========================================
   Multi-Step Application Form
   ======================================== */

/* Progress Bar */
.ehv-form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
    position: relative;
    padding: 0 20px;
    background: var(--ehv-bg-white);
    border-radius: var(--ehv-radius-lg);
    padding: 24px 20px 20px;
    box-shadow: var(--ehv-shadow);
}

.ehv-form-progress::before {
    content: '';
    position: absolute;
    top: 44px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: var(--ehv-border);
    z-index: 0;
    border-radius: 2px;
}

.ehv-form-progress__track {
    position: absolute;
    top: 44px;
    left: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--ehv-primary), var(--ehv-primary-light));
    z-index: 1;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.ehv-form-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ehv-form-step-indicator:hover {
    transform: translateY(-2px);
}

.ehv-form-step-indicator__number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ehv-bg);
    border: 3px solid var(--ehv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ehv-font-heading);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--ehv-text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.ehv-form-step-indicator.active .ehv-form-step-indicator__number {
    background: var(--ehv-primary);
    border-color: var(--ehv-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(86, 54, 209, 0.35);
    transform: scale(1.1);
}

.ehv-form-step-indicator.completed .ehv-form-step-indicator__number {
    background: var(--ehv-secondary);
    border-color: var(--ehv-secondary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(45, 128, 47, 0.3);
}

.ehv-form-step-indicator__label {
    font-size: 0.75rem;
    color: var(--ehv-text-muted);
    margin-top: 8px;
    text-align: center;
    max-width: 80px;
    transition: var(--ehv-transition);
}

.ehv-form-step-indicator.active .ehv-form-step-indicator__label {
    color: var(--ehv-primary);
    font-weight: 600;
}

.ehv-form-step-indicator.completed .ehv-form-step-indicator__label {
    color: var(--ehv-secondary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .ehv-form-step-indicator__label { display: none; }
    .ehv-form-progress { padding: 20px 12px 16px; }
    .ehv-form-progress::before { left: 20px; right: 20px; }
}

fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

/* Form Container */
.ehv-form {
    max-width: 720px;
    margin: 0 auto;
}

/* Form Steps */
.ehv-form-step {
    display: none;
}

.ehv-form-step.active {
    display: block;
    animation: fadeSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.ehv-form-step__title {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--ehv-text);
}

.ehv-form-step__desc {
    color: var(--ehv-text-muted);
    margin-bottom: 32px;
    font-size: 0.9375rem;
}

/* Form Fields */
.ehv-field {
    margin-bottom: 24px;
}

.ehv-field label {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 8px;
    color: var(--ehv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ehv-field label .required {
    color: var(--ehv-error);
    margin-left: 2px;
}

.ehv-field input[type="text"],
.ehv-field input[type="email"],
.ehv-field input[type="tel"],
.ehv-field input[type="number"],
.ehv-field input[type="date"],
.ehv-field select,
.ehv-field textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--ehv-border);
    border-radius: var(--ehv-radius);
    font-family: var(--ehv-font-primary);
    font-size: 1rem;
    color: var(--ehv-text);
    background: var(--ehv-bg);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.ehv-field input:hover,
.ehv-field select:hover,
.ehv-field textarea:hover {
    border-color: var(--ehv-primary-light);
    background: #fff;
}

.ehv-field input:focus,
.ehv-field select:focus,
.ehv-field textarea:focus {
    border-color: var(--ehv-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(86, 54, 209, 0.12), inset 0 1px 2px rgba(0,0,0,0.02);
    outline: none;
}

.ehv-field textarea {
    min-height: 120px;
    resize: vertical;
}

.ehv-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235636d1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.ehv-field__hint {
    font-size: 0.8125rem;
    color: var(--ehv-text-light);
    margin-top: 6px;
}

/* Field row (side by side) */
.ehv-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .ehv-field-row { grid-template-columns: 1fr; }
}

/* Checkboxes and Radios */
.ehv-check-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ehv-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: var(--ehv-radius);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.ehv-check:hover {
    background: var(--ehv-primary-subtle);
    border-color: rgba(86, 54, 209, 0.15);
}

.ehv-check:has(input:checked) {
    background: var(--ehv-primary-subtle);
    border-color: rgba(86, 54, 209, 0.2);
    box-shadow: 0 1px 3px rgba(86, 54, 209, 0.08);
}

.ehv-check input[type="checkbox"],
.ehv-check input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--ehv-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.ehv-check__label {
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* File Upload */
.ehv-file-upload {
    border: 2px dashed var(--ehv-border);
    border-radius: var(--ehv-radius-lg);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(135deg, rgba(242,242,242,0.5), rgba(240,236,251,0.3));
}

.ehv-file-upload:hover,
.ehv-file-upload.dragover {
    border-color: var(--ehv-primary);
    background: var(--ehv-primary-subtle);
    box-shadow: 0 4px 12px rgba(86, 54, 209, 0.1);
    transform: translateY(-2px);
}

.ehv-file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.ehv-file-upload__text {
    color: var(--ehv-text-muted);
    font-size: 0.9375rem;
}

.ehv-file-upload__text strong {
    color: var(--ehv-primary);
    font-size: 1rem;
}

.ehv-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ehv-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--ehv-bg-white);
    border: 1px solid var(--ehv-border);
    border-radius: var(--ehv-radius);
    font-size: 0.875rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ehv-file-item__remove {
    background: none;
    border: none;
    color: var(--ehv-error);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0 4px;
    transition: transform 0.2s ease;
}

.ehv-file-item__remove:hover {
    transform: scale(1.2);
}

/* Government Assistance Sections */
.ehv-govt-program {
    background: var(--ehv-bg-white);
    border-radius: var(--ehv-radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--ehv-border-light);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s ease;
}

.ehv-govt-program:hover {
    box-shadow: var(--ehv-shadow);
}

.ehv-govt-program__title {
    font-weight: 700;
    margin-bottom: 14px;
    font-size: 0.9375rem;
    color: var(--ehv-text);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ehv-primary-subtle);
}

/* Review Summary */
.ehv-review-section {
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--ehv-bg-white);
    border-radius: var(--ehv-radius);
    border: 1px solid var(--ehv-border-light);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.ehv-review-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ehv-primary-subtle);
}

.ehv-review-section__title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ehv-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ehv-review-section__edit {
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--ehv-accent);
    padding: 4px 12px;
    border-radius: var(--ehv-radius-full);
    transition: all 0.2s ease;
}

.ehv-review-section__edit:hover {
    background: rgba(34, 113, 177, 0.08);
}

.ehv-review-row {
    display: flex;
    padding: 8px 0;
    font-size: 0.9375rem;
}

.ehv-review-row + .ehv-review-row {
    border-top: 1px solid var(--ehv-border-light);
}

.ehv-review-row__label {
    width: 200px;
    flex-shrink: 0;
    color: var(--ehv-text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ehv-review-row__value {
    font-weight: 500;
}

/* Form Navigation */
.ehv-form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 2px solid var(--ehv-border-light);
}

.ehv-form-nav__save {
    font-size: 0.8125rem;
    color: var(--ehv-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ehv-form-nav__save::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ehv-secondary);
    display: inline-block;
    animation: savePulse 2s ease-in-out infinite;
}

@keyframes savePulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.ehv-form-nav__save strong {
    color: var(--ehv-secondary);
}

/* Success State */
.ehv-form-success {
    text-align: center;
    padding: 48px 24px;
}

.ehv-form-success__icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(45, 128, 47, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--ehv-secondary);
    box-shadow: 0 4px 16px rgba(45, 128, 47, 0.2);
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ehv-form-success__icon svg {
    width: 40px;
    height: 40px;
}

.ehv-form-success__ref {
    display: inline-block;
    background: var(--ehv-primary-subtle);
    padding: 14px 28px;
    border-radius: var(--ehv-radius);
    font-family: var(--ehv-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ehv-primary);
    margin: 16px 0;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(86, 54, 209, 0.12);
}

/* Status Tracker */
.ehv-status-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.ehv-status-form .ehv-field {
    text-align: left;
}

.ehv-status-result {
    max-width: 500px;
    margin: 24px auto 0;
    background: var(--ehv-bg-white);
    border-radius: var(--ehv-radius-lg);
    padding: 32px;
    box-shadow: var(--ehv-shadow-md);
}

.ehv-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--ehv-radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ehv-status-badge--pending {
    background: rgba(230, 168, 23, 0.1);
    color: #b8860b;
    box-shadow: 0 2px 8px rgba(230, 168, 23, 0.15);
}

.ehv-status-badge--review {
    background: rgba(34, 113, 177, 0.1);
    color: var(--ehv-accent);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.15);
}

.ehv-status-badge--approved {
    background: rgba(45, 128, 47, 0.1);
    color: var(--ehv-secondary);
    box-shadow: 0 2px 8px rgba(45, 128, 47, 0.15);
}

.ehv-status-badge--denied {
    background: rgba(211, 47, 47, 0.1);
    color: var(--ehv-error);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.15);
}

@media (max-width: 600px) {
    .ehv-form { padding: 24px 20px; }
    .ehv-review-row { flex-direction: column; }
    .ehv-review-row__label { width: auto; margin-bottom: 2px; }
    .ehv-check { padding: 10px 12px; }
}
