/* IAMN Form Builder - Frontend Form Aesthetics */

.iamn-form-wrapper {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-top: 4px solid #e3a14c;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin: 20px auto;
    max-width: 750px;
    font-family: inherit;
    position: relative;
    box-sizing: border-box;
}

.iamn-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a2b3c;
    margin: 0 0 15px 0;
}

/* Multi-step Progress Bar */
.iamn-form-progress-wrapper {
    margin-bottom: 25px;
    background: #f7f9fb;
    border-radius: 6px;
    padding: 12px 15px;
    border: 1px solid #e8edf2;
}

.iamn-form-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.iamn-form-progress-bar-bg {
    background: #e2e8f0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.iamn-form-progress-bar-fill {
    background: #e3a14c;
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Sections & Step Wrappers */
.iamn-form-step {
    transition: opacity 0.3s ease;
}

.iamn-form-section-divider {
    border-bottom: 2px solid #edf2f7;
    margin: 30px 0 20px 0;
    padding-bottom: 8px;
}

.iamn-form-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a2b3c;
    margin: 0 0 4px 0;
}

.iamn-form-section-desc {
    font-size: 13px;
    color: #718096;
    margin: 0;
}

/* Form Fields Layout */
.iamn-form-field-group {
    margin-bottom: 20px;
    position: relative;
}

.iamn-form-field-group label.iamn-form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 6px;
}

.iamn-form-field-group label.iamn-form-label .iamn-required-star {
    color: #e53e3e;
    margin-left: 3px;
    font-weight: bold;
}

.iamn-form-help-text {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    line-height: 1.4;
}

/* Field Controls Input Styling */
.iamn-form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 14px;
    color: #2d3748;
    background-color: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.iamn-form-control:focus {
    border-color: #e3a14c;
    box-shadow: 0 0 0 3px rgba(227, 161, 76, 0.15);
    outline: none;
}

.iamn-form-control::placeholder {
    color: #a0aec0;
}

textarea.iamn-form-control {
    resize: vertical;
    min-height: 100px;
}

/* Custom Checkboxes / Radios Layout */
.iamn-form-option-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.iamn-form-option-label {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

.iamn-form-option-label input[type="radio"],
.iamn-form-option-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    border: 1px solid #cbd5e0;
    cursor: pointer;
}

/* File Upload Field Aesthetics */
.iamn-form-file-container {
    border: 2px dashed #cbd5e0;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.iamn-form-file-container:hover {
    border-color: #e3a14c;
    background: #fffdfa;
}

.iamn-form-file-icon {
    font-size: 24px;
    color: #a0aec0;
    margin-bottom: 6px;
}

.iamn-form-file-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
}

.iamn-form-file-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.iamn-form-file-preview {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #e3a14c;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Validation Errors */
.iamn-form-error-msg {
    color: #e53e3e;
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
    display: none;
}

.iamn-form-field-group.has-error .iamn-form-control,
.iamn-form-field-group.has-error .iamn-form-file-container {
    border-color: #e53e3e;
    background-color: #fffafb;
}

.iamn-form-field-group.has-error .iamn-form-error-msg {
    display: block;
}

/* Navigation Buttons */
.iamn-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}

.iamn-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.iamn-form-btn-next,
.iamn-form-btn-submit {
    background-color: #e3a14c;
    color: #ffffff;
    border: 1px solid #e3a14c;
    margin-left: auto;
}

.iamn-form-btn-next:hover,
.iamn-form-btn-submit:hover {
    background-color: #d28f3a;
    border-color: #d28f3a;
}

.iamn-form-btn-prev {
    background-color: #ffffff;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.iamn-form-btn-prev:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
}

/* Submission feedback overlay */
.iamn-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.iamn-form-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.iamn-form-overlay-content {
    text-align: center;
    padding: 20px;
    max-width: 400px;
}

.iamn-form-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e3a14c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.iamn-form-success-icon {
    font-size: 48px;
    color: #48bb78;
    margin-bottom: 15px;
}

.iamn-form-error-icon {
    font-size: 48px;
    color: #e53e3e;
    margin-bottom: 15px;
}
