/* ══════════════════════════════════════════════════════════════
   کوچ — استایل اختصاصی «مهاجرت کاری»
   work-immigration.css

   پیش‌نیاز:
   assets/css/base.css
   ══════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   محاسبه‌گر امتیاز کاری
   ══════════════════════════════════════════════════════════════ */

.calc-card {
  margin-top: 40px;

  display: grid;
  grid-template-columns: 1fr 340px;

  gap: 36px;

  background: var(--card);

  border: 1px solid var(--line);

  border-radius: 28px;

  padding: 40px;

  box-shadow: var(--shadow-lg);
}


/* ══════════════════════════════════════════════════════════════
   فرم محاسبه‌گر
   ══════════════════════════════════════════════════════════════ */

.calc-form {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 18px;

  align-content: start;
}


/* ══════════════════════════════════════════════════════════════
   فیلد
   ══════════════════════════════════════════════════════════════ */

.calc-form .field {
  position: relative;

  min-width: 0;
}


/* عنوان فیلد */

.calc-form .field label {
  display: block;

  margin-bottom: 10px;

  font-size: 13px;

  font-weight: 800;

  line-height: 1.8;

  color: var(--ink);

  text-align: right;
}


/* ══════════════════════════════════════════════════════════════
   SELECT — اصلاح اصلی فلش
   ══════════════════════════════════════════════════════════════ */

.calc-form .field select {
  width: 100%;

  height: 46px;

  min-height: 46px;

  box-sizing: border-box;

  padding: 0 16px 0 44px;

  border: 1px solid #dce4f0;

  border-radius: 14px;

  background-color: #f7f9fd;

  color: var(--ink);

  font-family: var(--font);

  font-size: 13.5px;

  font-weight: 600;

  line-height: 46px;

  text-align: right;

  direction: rtl;

  cursor: pointer;

  outline: none;

  /* حذف فلش پیش‌فرض مرورگر */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* فلش اختصاصی */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235b6b83' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  background-repeat: no-repeat;

  /* فلش سمت چپ چون صفحه RTL است */
  background-position: left 15px center;

  background-size: 16px 16px;

  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background-color .2s ease;
}


/* جلوگیری از فلش‌های عجیب در IE/Edge قدیمی */

.calc-form .field select::-ms-expand {
  display: none;
}


/* Hover */

.calc-form .field select:hover {
  border-color: rgba(46, 196, 182, .55);

  background-color: #f9fbff;
}


/* Focus */

.calc-form .field select:focus {
  border-color: var(--teal);

  background-color: #ffffff;

  box-shadow:
    0 0 0 4px rgba(46, 196, 182, .11);

  /* فلش در حالت فوکوس */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230d9487' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}


/* ══════════════════════════════════════════════════════════════
   نتیجه محاسبه
   ══════════════════════════════════════════════════════════════ */

.calc-result {
  text-align: center;

  background: var(--bg-soft);

  border-radius: 22px;

  padding: 30px 26px;

  display: flex;

  flex-direction: column;

  gap: 10px;
}


/* ══════════════════════════════════════════════════════════════
   حلقه امتیاز
   ══════════════════════════════════════════════════════════════ */

.calc-ring {
  position: relative;

  width: 170px;
  height: 170px;

  margin-inline: auto;
}


.calc-ring svg {
  width: 100%;
  height: 100%;

  transform: rotate(-90deg);
}


.ring-bg {
  fill: none;

  stroke: var(--line);

  stroke-width: 11;
}


.ring-fg {
  fill: none;

  stroke: var(--teal);

  stroke-width: 11;

  stroke-linecap: round;

  stroke-dasharray: 327;

  stroke-dashoffset: 327;

  transition:
    stroke-dashoffset 1s cubic-bezier(.22,1,.36,1);
}


/* ══════════════════════════════════════════════════════════════
   عدد امتیاز
   ══════════════════════════════════════════════════════════════ */

.calc-score {
  position: absolute;

  inset: 0;

  display: grid;

  place-content: center;

  line-height: 1.4;
}


.calc-score strong {
  font-size: 44px;

  font-weight: 900;

  color: var(--teal-deep);
}


html[data-theme="dark"] .calc-score strong {
  color: var(--teal-bright);
}


.calc-score span {
  font-size: 12.5px;

  font-weight: 700;

  color: var(--muted);
}


/* ══════════════════════════════════════════════════════════════
   عنوان نتیجه
   ══════════════════════════════════════════════════════════════ */

.calc-result h3 {
  font-size: 19px;

  font-weight: 900;

  color: var(--ink);
}


.calc-result p {
  font-size: 13.5px;

  line-height: 2;

  color: var(--muted);

  min-height: 54px;

  margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   Dark Mode
   ══════════════════════════════════════════════════════════════ */

html[data-theme="dark"] .calc-form .field label {
  color: var(--ink);
}


html[data-theme="dark"] .calc-form .field select {
  background-color: rgba(255,255,255,.045);

  border-color: rgba(255,255,255,.10);

  color: var(--ink);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}


html[data-theme="dark"] .calc-form .field select:hover {
  background-color: rgba(255,255,255,.065);

  border-color: rgba(94,234,212,.35);
}


html[data-theme="dark"] .calc-form .field select:focus {
  background-color: rgba(255,255,255,.075);

  border-color: var(--teal-bright);

  box-shadow:
    0 0 0 4px rgba(94,234,212,.10);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235eead4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}


/* ══════════════════════════════════════════════════════════════
   Responsive — Tablet
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

  .calc-card {
    grid-template-columns: 1fr;

    padding: 30px 24px;
  }

}


/* ══════════════════════════════════════════════════════════════
   Responsive — Mobile
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

  .calc-form {
    grid-template-columns: 1fr;

    gap: 16px;
  }


  .calc-form .field select {
    height: 48px;

    min-height: 48px;

    padding-right: 15px;

    padding-left: 44px;

    line-height: 48px;

    background-position: left 14px center;

    background-size: 15px 15px;
  }


  .calc-result {
    padding: 26px 20px;
  }


  .calc-ring {
    width: 155px;
    height: 155px;
  }


  .calc-score strong {
    font-size: 40px;
  }

}


/* ══════════════════════════════════════════════════════════════
   اصلاح نهایی برای مرورگرهای WebKit
   ══════════════════════════════════════════════════════════════ */

.calc-form .field select option {
  font-family: var(--font);

  font-size: 14px;

  direction: rtl;

  text-align: right;
}


/* حذف outline پیش‌فرض */

.calc-form .field select:focus-visible {
  outline: none;
}