/* AI Resume Builder Frontend Multi-Step Form CSS */
.ai-resume-form-wrapper {
    max-width: 860px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

/* Progress bar & Step Navigation */
.ai-progress-container { margin-bottom: 32px; }
.ai-progress-bar { width: 100%; height: 6px; background: #e2e8f0; border-radius: 9999px; overflow: hidden; margin-bottom: 20px; }
.ai-progress-fill { height: 100%; background: #2563eb; transition: width 0.3s ease; }
.ai-steps-nav { display: flex; justify-content: space-between; position: relative; }
.ai-step-indicator { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; opacity: 0.5; transition: all 0.2s ease; }
.ai-step-indicator.active { opacity: 1; }
.ai-step-indicator.completed .ai-step-num { background: #10b981; color: #fff; }
.ai-step-num { width: 34px; height: 34px; border-radius: 50%; background: #e2e8f0; color: #475569; display: flex; align-items: center; justify-content: center; font-weight: bold; margin-bottom: 6px; font-size: 13px; }
.ai-step-indicator.active .ai-step-num { background: #2563eb; color: #fff; }
.ai-step-label { font-size: 12px; font-weight: 500; color: #1e293b; }

/* Steps */
.ai-form-step { display: none; }
.ai-form-step.active { display: block; animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.ai-step-title { font-size: 20px; font-weight: bold; color: #0f172a; margin-bottom: 8px; }
.ai-step-desc { font-size: 13px; color: #64748b; margin-bottom: 24px; }

/* Grid and Inputs */
.ai-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
.ai-form-group { display: flex; flex-direction: column; margin-bottom: 16px; }
.ai-form-group.full-width { grid-column: 1 / -1; }
.ai-form-group label { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.ai-form-group label .req { color: #ef4444; }
.ai-input, .ai-select, .ai-textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s;
}
.ai-input:focus, .ai-select:focus, .ai-textarea:focus {
    border-color: #2563eb;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.field-error { color: #ef4444; font-size: 11px; margin-top: 4px; min-height: 16px; }

/* Service selector */
.ai-service-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 10px 0 20px 0; }
.ai-service-card { border: 2px solid #e2e8f0; border-radius: 10px; padding: 16px; display: flex; align-items: flex-start; cursor: pointer; background: #f8fafc; transition: all 0.2s; }
.ai-service-card input { margin-left: 10px; margin-top: 4px; }
.ai-service-card.active { border-color: #2563eb; background: #eff6ff; }
.ai-service-info strong { display: block; font-size: 14px; color: #1e293b; margin-bottom: 4px; }
.ai-service-info span { font-size: 12px; color: #64748b; line-height: 1.4; display: block; }

/* Repeater items */
.ai-repeater-row { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 20px; margin-bottom: 16px; position: relative; }
.ai-repeater-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: bold; font-size: 13px; color: #475569; }
.ai-remove-row-btn, .ai-remove-edu-btn { background: #fee2e2; color: #ef4444; border: none; padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }

/* Actions */
.ai-form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.ai-btn { padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; border: none; transition: all 0.2s; }
.ai-btn-prev { background: #f1f5f9; color: #475569; }
.ai-btn-next { background: #2563eb; color: #fff; }
.ai-btn-secondary { background: #e0e7ff; color: #3730a3; margin-bottom: 16px; }
.ai-btn-submit { background: #16a34a; color: #fff; }
.ai-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ai-notice-box { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 14px; border-radius: 8px; font-size: 13px; margin: 16px 0; }

@media (max-width: 640px) {
    .ai-form-grid, .ai-service-selector { grid-template-columns: 1fr; }
    .ai-step-label { display: none; }
}

/* Intro & Consent Screen */
.ai-intro-title { font-size: 24px; font-weight: bold; color: #0f172a; margin-bottom: 12px; }
.ai-intro-lead { font-size: 14px; color: #475569; line-height: 1.9; margin-bottom: 24px; }
.ai-intro-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.ai-intro-option { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px; }
.ai-intro-option h4 { font-size: 14px; color: #1e293b; margin: 0 0 10px 0; }
.ai-intro-option ul { margin: 0; padding-inline-start: 18px; }
.ai-intro-option li { font-size: 12.5px; color: #475569; line-height: 1.9; }
.ai-intro-note { font-size: 13px; color: #64748b; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px 14px; margin-bottom: 24px; }
.ai-terms-box { background: #fefce8; border: 1px solid #fde68a; border-radius: 10px; padding: 18px; margin-bottom: 20px; max-height: 260px; overflow-y: auto; }
.ai-terms-box h4 { font-size: 14px; color: #78350f; margin: 0 0 10px 0; }
.ai-terms-box ul { margin: 0; padding-inline-start: 18px; }
.ai-terms-box li { font-size: 12.5px; color: #713f12; line-height: 1.9; margin-bottom: 6px; }
.ai-terms-checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: #1e293b; font-weight: 600; cursor: pointer; margin-bottom: 24px; }
.ai-terms-checkbox-row input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; }
.ai-intro-actions { display: flex; justify-content: flex-end; }

@media (max-width: 640px) {
    .ai-intro-compare { grid-template-columns: 1fr; }
}
