/* ============================================ */
/* بخش دوم: CSS فرم DigiDiet - ظاهر پزشکی، ریسپانسیو، RTL */
/* ============================================ */

.digidiet-form-wrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 25px 30px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0,80,80,0.12);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    color: #1a2a3a;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 35px;
}
.progress-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 10px;
}
.step {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #b0c4d9;
    padding: 6px 0;
    border-bottom: 4px solid #e0e8f0;
    transition: 0.3s;
    cursor: default;
}
.step.active {
    color: #0b6e4f;
    border-bottom-color: #0b6e4f;
}
.step.done {
    color: #2a9d8f;
    border-bottom-color: #2a9d8f;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9f0f5;
    border-radius: 10px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2a9d8f, #1b7a6a);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* Steps visibility */
.form-step {
    display: none;
    animation: fadeSlide 0.3s ease;
}
.form-step.active {
    display: block;
}
@keyframes fadeSlide {
    0% { opacity: 0.3; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Form elements */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 18px;
}
.form-group {
    flex: 1 1 calc(50% - 18px);
    min-width: 200px;
}
.form-group.full-width {
    flex: 1 1 100%;
}
label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #1f3a4b;
}
.required {
    color: #d94f4f;
    margin-right: 3px;
}
input, select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dce5ed;
    border-radius: 10px;
    font-size: 15px;
    background: #fafcfe;
    transition: 0.25s;
    box-sizing: border-box;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    border-color: #1b7a6a;
    box-shadow: 0 0 0 3px rgba(27,122,106,0.15);
    outline: none;
}
textarea {
    min-height: 70px;
    resize: vertical;
}
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    background: #f5f9fc;
    padding: 14px 16px;
    border-radius: 12px;
}
.checkbox-group label {
    font-weight: 400;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1b7a6a;
}

/* Navigation buttons */
.form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-next, .btn-prev, .btn-submit {
    padding: 12px 32px;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.25s;
    background: #eef4f8;
    color: #1f3a4b;
}
.btn-next {
    background: #0b6e4f;
    color: #fff;
}
.btn-next:hover {
    background: #095a41;
    transform: scale(1.02);
}
.btn-prev {
    background: #e2eaf0;
}
.btn-prev:hover {
    background: #d0dbe6;
}
.btn-submit {
    background: #0b6e4f;
    color: #fff;
    padding: 12px 48px;
    font-size: 18px;
}
.btn-submit:hover {
    background: #095a41;
    box-shadow: 0 4px 14px rgba(11,110,79,0.35);
}
.btn-next:disabled, .btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Conditional sections */
.conditional-section {
    display: none;
    padding: 16px 14px;
    background: #f2f9f7;
    border-radius: 14px;
    margin: 12px 0;
    border-right: 5px solid #1b7a6a;
}
.conditional-section.visible {
    display: block;
}

/* Responsive */
@media (max-width: 650px) {
    .digidiet-form-wrapper { padding: 18px 14px; }
    .form-group { flex: 1 1 100%; }
    .step { font-size: 11px; padding: 4px 0; }
    .form-nav { flex-direction: column; align-items: stretch; }
    .btn-next, .btn-prev, .btn-submit { text-align: center; }
}