/* =========================
   Language Placement – Quiz UI (LTR only)
   Replace your whole quiz CSS with this
   ========================= */
/* === Force LTR only for the quiz form & result === */
.lp-quiz-wrapper #lp-quiz-form,
.lp-quiz-wrapper #lp-quiz-form *,
.lp-quiz-wrapper #lp-quiz-result,
.lp-quiz-wrapper #lp-quiz-result *{
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: embed; /* جلوگیری از برهم‌زدگی اعداد/علامت‌ها */
}
/* پایه و ظرف کلی آزمون */
.lp-quiz-wrapper{
  direction: ltr !important;
  text-align: left !important;
  font-size: 16px;
  line-height: 1.7;
}
.lp-quiz-wrapper *{ box-sizing: border-box; }

/* هدر اطلاع‌رسانی فارسی (RTL) */
.lp-quiz-hero,
.lp-quiz-hero h3,
.lp-quiz-hero p{
  direction: rtl !important;
  text-align: right !important;
}
.lp-quiz-hero{
  max-width: 960px;
  margin: 20px auto 12px;
  padding: 18px 20px;
  background: linear-gradient(135deg,#ffffff,#f6f7fb);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  color: #111827;
  font-family: "yekan", Sans-serif;
}
.lp-quiz-hero h3{
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
}
.lp-quiz-hero p{
  margin: 0;
  line-height: 1.9;
  font-size: .95rem;
  color: #374151;
}

/* نوار شروع و تایمر */
.lp-quiz-startbar{
  max-width: 960px;
  margin: 8px auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lp-btn-primary{
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-family: "yekan", Sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37,99,235,.35);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.lp-btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 8px 18px rgba(37,99,235,.45); background:#1d4ed8; }
.lp-btn-primary:disabled{ opacity:.6; cursor:not-allowed; box-shadow:none; }

.lp-quiz-timer{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #111827;
  color: #f9fafb;
  font-weight: 700;
  font-family: "yekan", Sans-serif;
  letter-spacing: .5px;
}
.lp-quiz-timer .label{ opacity:.85; font-weight:500; }
.lp-quiz-timer .time{ font-variant-numeric: tabular-nums; font-size: 1.05rem; }

/* پیام قفل آزمون مجدد */
.lp-retake-lock{
  max-width: 960px;
  margin: 8px auto 16px;
  padding: 10px 12px;
  background: #fff7ed;
  color: #7c2d12;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  font-weight: 600;
  font-family: "yekan", Sans-serif;
}

/* فرم آزمون (کارت تمیز) */
#lp-quiz-form{
  max-width: 960px;
  margin: 0 auto 24px;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #E7E7E7;
  box-shadow: 8px 8px 28px rgba(13,21,3,1.06);
}

/* صورت سؤال */
.lp-q-text{
  margin: 0 0 14px;
  line-height: 1.8;
  color: #0f172a;
  font-size: 1.02rem;
}
.lp-q-text strong{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 800;
}

/* هر بلوک سؤال */
.lp-question{
  padding: 16px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.lp-question:last-child{
  border-bottom: 0;
  padding-bottom: 0;
}

/* گزینه‌ها – آیتم قابل‌کلیک بزرگ با فوکوس/انتخاب زیبا */
.lp-question > div{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
  margin: 8px 0;
}
.lp-question > div:hover{
  background: #f8fafc;
  border-color: #e5e7eb;
}
.lp-question input[type="radio"]{
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: #2563eb; /* مدرن‌ها */
  cursor: pointer;
}
.lp-question label{
  cursor: pointer;
  display: block;
  margin: 0;
  color: #1f2937;
  font-size: 0.98rem;
}

/* حالت انتخاب/فوکوس: قاب و سایه */
.lp-question input[type="radio"]:checked + label,
.lp-question input[type="radio"]:focus-visible + label{
  outline: 0;
}
.lp-question input[type="radio"]:checked ~ label,
.lp-question input[type="radio"]:checked ~ label + *{
  /* fallback اگر ساختمان DOM متفاوت بود */
}
.lp-question input[type="radio"]:checked + label,
.lp-question input[type="radio"]:focus-visible + label{
  text-shadow: 0 0 0 rgba(0,0,0,0);
}
.lp-question input[type="radio"]:focus-visible{
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
  border-radius: 50%;
}

/* وقتی گزینه انتخاب شد، کل ردیف را برجسته کنم */
.lp-question > div:has(input[type="radio"]:checked){
  background: #eef2ff;
  border-color: #c7d2fe;
  box-shadow: 0 6px 14px rgba(59,130,246,.15);
}

/* دکمه ارسال */
#lp-quiz-form button[type="submit"]{
  margin-top: 10px;
  border-radius: 12px;
  padding: 12px 18px;
  background: #10b981;
  color: #fff;
  border: 0;
  font-weight: 800;
  font-family: "yekan", Sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16,185,129,.35);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
#lp-quiz-form button[type="submit"]:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(16,185,129,.45);
  background:#059669;
}

/* متن‌های درک مطلب */
.lp-passage{
  margin: 18px 0;
  padding: 14px 16px;
  background: #f9fafb;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  color: #334155;
  font-style: normal;
}

/* نتیجه آزمون */
#lp-quiz-result{
  max-width: 960px;
  margin: 16px auto 24px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-family: "yekan", Sans-serif;
  border: 1px solid transparent;
}
#lp-quiz-result.success{
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
#lp-quiz-result.failure{
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

/* لیست دوره‌ها (همان قبلی با بهبود nhẹ) */
.lp-class-courses-list{
  list-style: none;
  margin: 0;
  padding: 0;
}
.lp-class-courses-list li{
  display: inline-block;
  margin: 6px;
}
.lp-class-courses-list li a{
  display: block;
  padding: 6px 10px;
  background: #f5f5f5;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  font-size: .95em;
  color: #111827;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.lp-class-courses-list li a:hover{
  background: #eef2ff;
  border-color: #c7d2fe;
  box-shadow: 0 8px 18px rgba(59,130,246,.12);
}
.lp-class-courses-list li.none{
  display: block;
  color: #888;
  padding: 8px;
}

/* ریسپانسیو */
@media (max-width: 640px){
  .lp-quiz-hero{ padding: 14px 16px; border-radius: 14px; }
  .lp-quiz-startbar{ flex-direction: column; align-items: flex-start; gap: 10px; }
  .lp-quiz-timer{ margin-left: 0; }
  #lp-quiz-form{ padding: 16px; border-radius: 14px; }
  .lp-q-text{ font-size: 1rem; }
  .lp-question > div{ padding: 10px 12px; }
  .lp-btn-primary{ width: 100%; text-align: center; }
}
