/* عمومی */
#toshak-ai-wizard { background: #8ECBDE; padding: 30px 20px; border-radius: 20px; width: 92%; max-width: 880px; margin: 40px auto; color: #333; position: relative; overflow: hidden; }

/* استایل لوگو و توضیح استارت */
// استارت به عنوان بلوک داخلی درون ویزارد نمایش داده می‌شود و پاپ‌آپ نیست
.startup-screen {
    display: block;
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    width: min(760px, 92%);
    margin: 0 auto 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.startup-content {
    display: block;
    text-align: center;
}

#ai_start_btn {
  border-radius: 10px;
  margin: 2rem 0 0 0;
}

/* استایل هدر (نمایش فقط در اسلاید ۱) */
.wizard-header { text-align: center; margin-bottom: 10px; display:none; }
.wizard-header img { max-width: 80px; margin-bottom: 6px; }

/* استایل نوار پیشرفت جدید (خط افقی با نشانگر مراحل) */
.wizard-progress { display:flex; flex-direction:column; align-items:center; margin: 8px auto 12px; width: 100%; max-width: 600px; display:none; direction: rtl; }
.progress-track { width: 100%; height: 6px; background:#e0e0e0; border-radius:6px; position: relative; }
.progress-fill { position:absolute; right:0; top:0; height:6px; width:0%; background:#006d77; border-radius:6px; transition: width .3s ease; left: auto; }
.step-dots { display:flex; justify-content: space-between; width:100%; margin-top:8px; direction: rtl; }
.step-dots .dot { width:14px; height:14px; border-radius:50%; background:#cccccc; display:inline-block; }
.step-dots .dot.active { background:#006d77; }

/* ترنزیشن اسلایدها با انیمیشن ملایم */
.wizard-step { display: none; opacity: 0; transform: translateX(20px); transition: opacity 0.4s ease, transform 0.4s ease; }
.wizard-step.active { display: block; opacity: 1; transform: translateX(0); padding:2rem; }

/* فرم‌ها: دو سوال در هر اسلاید (یک ستون) */
.form-field { width: 90%; max-width: 520px; margin: 12px auto; text-align: left; }
.form-field h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; text-align: right; }

/* ورودی‌ها و انتخاب‌ها */
.form-field input, .form-field select { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #ccc; font-size: 15px; }

/* دکمه‌ها با تراز مناسب */
.wizard-buttons { display:flex; justify-content: space-between; gap: 12px; width: 100%; max-width: 520px; margin: 12px auto 0; padding:2rem 0 0 0;  }
.wizard-buttons button { flex: 1; min-width: 120px; border-radius: 10px; }

/* دکمه‌های عمومی */
button { background: #006d77; color: white; padding: 10px 25px; border: none; border-radius: 12px; cursor: pointer; margin-top: 6px; transition: background 0.3s ease; }
button:hover { background: #004f55; }

/* مرکز شدن دکمه Next در اولین مرحله (برای نبود Prev) */
.wizard-step[data-step="1"] .wizard-buttons { justify-content: center; }

/* تکس باکس قابل ویرایش (برای استارت) */
.startup-edit-area {
    min-height: 120px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px;
    background: #fff;
    direction: rtl;
    text-align: right;
    margin: 8px 0;
}

/* حاشیه‌های ورودی عددی: پنهان‌سازی Spinnerها برای ورودی‌های عددی (قد و وزن) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* نتایج و محصولات */
#ai-results { margin-top: 20px; }

/* لودینگ مدرن وسط صفحه برای نتایج */
.loading-overlay { position: relative; padding: 20px; text-align: center; }
.loading-overlay .loader {
  width: 48px; height: 48px; border: 6px solid #ddd; border-top-color: #3498db; border-radius: 50%; margin: 0 auto 12px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* بودجه اسلایدر و نمایش مقدار */
.range-display { text-align: center; margin-top: 6px; font-weight: 600; }

/* نتایج_products */
.ai-products {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 15px;
}
.ai-product {
    background: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.ai-product img { max-width: 100%; border-radius: 8px; }

.discount-box {
    margin-top: 20px;
    padding: 15px;
    background: #f1fdfd;
    border: 1px dashed #006d77;
    border-radius: 10px;
    text-align: center;
}

@keyframes popIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* استایل RTL دسکتاپ: فیلدها مرکزگرایی شوند */
@media (min-width: 769px) {
  .form-field { width: 420px; }
}

/* پاسخ‌گویی و موبایل */
@media (max-width: 768px) {
    #toshak-ai-wizard { width: 95%; }
    .form-field { width: 90%; max-width: 380px; }
    .wizard-buttons { flex-direction: row; gap: 8px; }
}