/* =========================================================
   Yooz — Loan card («پنل آبی»)
   طرح تأییدشده‌ی کارت وام؛ در صفحه‌ی لیست وام‌ها (/loans/) و هر جای دیگر.
   رنگ‌های پایه از :root قالب (style.css) می‌آیند؛ رنگ‌های تکمیلی طرح وام
   (همان مقادیر loan-single.css) و شعاع‌های اختصاصی کارت، روی خود کارت
   تعریف شده‌اند تا روی بقیه‌ی سایت اثری نگذارند.
   ========================================================= */
.yz-lc {
  --yz-color-primary-deep: #0b3d86;
  --yz-color-primary-soft: #e8f1fd;
  --yz-color-primary-on-deep: #bcd4f6;
  --yz-color-secondary-soft: #fff3e5;
  --yz-color-secondary-strong: #e07600;
  --yz-color-secondary-text: #8a4500;
  --yz-color-success-soft: #e6f5ee;
  --yz-color-success-text: #157a50;
  --yz-color-danger-soft: #fdecec;
  --yz-color-danger-text: #b3261e;

  /* شعاع‌های کارت (کمی بیشتر از توکن‌های عمومی قالب، طبق طرح) */
  --yz-radius-button: 12px;
  --yz-radius-xl: 18px;
  --yz-radius-2xl: 28px;

  --yz-card-shadow-hover: 0 25px 50px -24px rgba(15, 79, 168, .28);
  --yz-ease: cubic-bezier(.22, .8, .24, 1);

  font-family: var(--yz-font, "Vazirmatn", Tahoma, sans-serif);
  line-height: 1.7;
  text-align: right;
}
.yz-lc *, .yz-lc *::before, .yz-lc *::after { box-sizing: border-box; }
.yz-lc h3, .yz-lc p { margin: 0; }
.yz-lc a, .yz-lc a:hover { color: inherit; text-decoration: none; }
.yz-lc__logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; display: block; }

/* =========================================================
   اجزای مشترک همه‌ی کارت‌ها
   ========================================================= */
.yz-lc {
  position: relative;
  background: var(--yz-color-bg);
  border: 1px solid var(--yz-color-border);
  border-radius: var(--yz-radius-2xl);
  transition: border-color .25s, box-shadow .3s var(--yz-ease), transform .3s var(--yz-ease);
}
.yz-lc:hover { border-color: #cfdcf0; box-shadow: var(--yz-card-shadow-hover); transform: translateY(-2px); }
.yz-lc:focus-within { box-shadow: var(--yz-card-shadow-hover); }

/* کل کارت قابل کلیک؛ لینک اصلی روی کل سطح کشیده می‌شود */
.yz-lc__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.yz-lc__link:focus-visible { outline: none; }
.yz-lc:has(.yz-lc__link:focus-visible) { outline: 3px solid var(--yz-color-primary); outline-offset: 3px; }

.yz-lc__bank { display: flex; align-items: center; gap: 10px; min-width: 0; }
.yz-lc__logo {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 14px;
  background: var(--yz-color-bg-soft); border: 1px solid var(--yz-color-border);
  display: grid; place-items: center;
  font-weight: 900; font-size: 15px; color: var(--yz-color-primary-dark);
  overflow: hidden;
}
.yz-lc__bank-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
.yz-lc__bank-name { font-size: 14px; font-weight: 700; color: var(--yz-color-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yz-lc__type { font-size: 12.5px; color: var(--yz-color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.yz-lc__title { font-size: 17px; font-weight: 800; line-height: 1.6; color: var(--yz-color-heading); }

.yz-lc__status {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 9999px;
  font-size: 12px; font-weight: 800;
  background: var(--yz-color-success-soft); color: var(--yz-color-success-text);
}
.yz-lc__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--yz-color-success); }
.yz-lc[data-active="0"] .yz-lc__status { background: var(--yz-color-danger-soft); color: var(--yz-color-danger-text); }
.yz-lc[data-active="0"] .yz-lc__status::before { background: var(--yz-color-danger); }

.yz-lc__num { font-variant-numeric: tabular-nums; }
.yz-lc small { font-size: 12px; font-weight: 500; color: var(--yz-color-text-muted); }

.yz-lc__fee-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 9999px;
  font-size: 11.5px; font-weight: 700;
  background: var(--yz-color-secondary-soft); color: var(--yz-color-secondary-text);
}
.yz-lc__fee-tag--cash { background: var(--yz-color-bg-soft); color: var(--yz-color-gray-700); }

.yz-lc__btn {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: var(--yz-radius-button);
  background: var(--yz-color-primary); color: #fff;
  font-size: 15px; font-weight: 800; font-family: inherit; border: 0; cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(26, 115, 232, .6);
  transition: background-color .2s, transform .15s;
}
.yz-lc__btn svg { width: 18px; height: 18px; transition: transform .2s var(--yz-ease); }
.yz-lc:hover .yz-lc__btn { background: var(--yz-color-primary-dark); }
.yz-lc:hover .yz-lc__btn svg { transform: translateX(-4px); }
.yz-lc__btn--icon { width: 48px; padding: 0; border-radius: 50%; }
.yz-lc[data-active="0"] .yz-lc__btn { background: var(--yz-color-border-soft); color: var(--yz-color-gray-600); box-shadow: none; }
.yz-lc[data-active="0"] .yz-lc__btn svg { transform: none; }

/* وام غیرفعال: کمی کم‌رنگ‌تر، اما همچنان خوانا */
.yz-lc[data-active="0"] .yz-lc__dim { opacity: .55; }

/* =========================================================
   کارت وام — پنل آبی (ایستاده)
   ========================================================= */
.yz-lc2 { overflow: hidden; display: flex; flex-direction: column; }
.yz-lc2__hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 8px; padding: 20px 20px 18px; border-radius: 22px;
  background: var(--yz-color-primary-deep); color: #fff;
  display: flex; flex-direction: column; gap: 18px;
}
.yz-lc2__rings { position: absolute; z-index: -1; left: -120px; top: -150px; width: 320px; height: 320px; }
.yz-lc2__rings circle { fill: none; stroke: #fff; stroke-width: 1.5; }
.yz-lc2__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.yz-lc2 .yz-lc__logo { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); color: #fff; }
.yz-lc2 .yz-lc__bank-name { color: #fff; }
.yz-lc2 .yz-lc__type { color: var(--yz-color-primary-on-deep); }
.yz-lc2__rate {
  flex-shrink: 0; width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid var(--yz-color-secondary); background: rgba(255, 138, 0, .08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2;
}
.yz-lc2__rate strong { font-size: 17px; font-weight: 900; color: #ffa53a; }
.yz-lc2__rate span { font-size: 9.5px; color: var(--yz-color-primary-on-deep); }
.yz-lc2__amount-label { display: block; font-size: 13px; color: var(--yz-color-primary-on-deep); }
.yz-lc2__amount { display: flex; align-items: baseline; gap: 8px; }
.yz-lc2__amount strong { font-size: 32px; font-weight: 900; line-height: 1.3; }
.yz-lc2__amount span { font-size: 14px; color: var(--yz-color-primary-on-deep); }

/* اقساط: [تقویم] ۳۶ ماهه | [کارت] مبلغ قسط ماهانه */
.yz-lc2__plan {
  display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1.5fr); align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08);
}
.yz-lc2__plan-sep { width: 1px; height: 34px; background: rgba(255, 255, 255, .14); }
.yz-lc2__plan-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.yz-lc2__plan-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: #fff;
}
.yz-lc2__plan-icon svg { width: 18px; height: 18px; }
.yz-lc2__plan-text { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.yz-lc2__plan-text strong { font-size: 16px; font-weight: 900; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.yz-lc2__plan-text strong small { font-size: 11.5px; font-weight: 500; color: var(--yz-color-primary-on-deep); }
.yz-lc2__plan-text span { font-size: 11.5px; color: var(--yz-color-primary-on-deep); }

.yz-lc2__body { padding: 12px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.yz-lc2__body-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.yz-lc2__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.yz-lc2__price { display: flex; flex-direction: column; line-height: 1.5; }
.yz-lc2__price span { font-size: 12.5px; color: var(--yz-color-text-muted); }
.yz-lc2__price strong { font-size: 20px; font-weight: 900; color: var(--yz-color-heading); }
.yz-lc2 .yz-lc__btn { width: 100%; height: 50px; }
.yz-lc__fee-tag { height: 26px; padding: 0 12px; }

/* غیرفعال: پنل خاکستری‌آبی، دایره‌ی سود کم‌رنگ */
.yz-lc2[data-active="0"] .yz-lc2__hero { background: #2b3a52; }
.yz-lc2[data-active="0"] .yz-lc2__rate { border-color: rgba(255, 255, 255, .3); background: transparent; }
.yz-lc2[data-active="0"] .yz-lc2__rate strong { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .yz-lc, .yz-lc * { transition: none !important; }
  .yz-lc:hover { transform: none; }
}
.yz-lc2 .yz-lc__logo:has(img) { background: #fff; border-color: #fff; }

/* =========================================================
   کارت‌های باریک (مثلاً سه ستون کنار سایدبار فیلتر)
   ردیف اقساط با container query جمع‌وجورتر می‌شود تا مبلغ قسط کامل دیده شود.
   ========================================================= */
.yz-lc2 { container-type: inline-size; }
@container (max-width: 360px) {
  .yz-lc2__hero { padding: 18px 16px 16px; gap: 16px; }
  .yz-lc2__plan { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 2fr); gap: 10px; padding: 10px 12px; }
  .yz-lc2__plan-icon { display: none; }
  .yz-lc2__amount strong { font-size: 28px; }
  .yz-lc2__body { padding: 12px 16px 18px; }
}

/* =========================================================
   کارت افقی جمع‌وجور (.yz-lcm) — Yooz_Loan_Card::render( $loan, 'compact' )
   [کاشی آبی لوگو] [بانک/عنوان/مبلغ·اقساط·سود] [هزینه امتیاز + دکمه]
   ========================================================= */
.yz-lcm {
  container-type: inline-size;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 12px;
  border-radius: 24px;
}
.yz-lcm__visual {
  position: relative; isolation: isolate; overflow: hidden;
  width: 76px; height: 76px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--yz-color-primary-deep);
}
.yz-lcm__rings { position: absolute; z-index: -1; left: -60px; top: -62px; width: 160px; height: 160px; }
.yz-lcm__rings circle { fill: none; stroke: #fff; stroke-width: 1.5; }
.yz-lcm__logo {
  width: 42px; height: 42px; border-radius: 13px; overflow: hidden;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; font-size: 16px; font-weight: 900;
}
.yz-lcm__logo:has(img) { background: #fff; border-color: #fff; }
.yz-lcm__logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; display: block; }

.yz-lcm__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.yz-lcm__bank {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 12.5px; color: var(--yz-color-text-muted, #6b7280); white-space: nowrap; overflow: hidden;
}
.yz-lcm__bank i { width: 3px; height: 3px; border-radius: 50%; background: var(--yz-color-gray-300, #d1d5db); flex-shrink: 0; }
.yz-lcm__bank .yz-lc__status { height: 22px; padding: 0 8px; font-size: 11px; }
.yz-lcm__title { font-size: 15.5px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yz-lcm__facts { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; font-size: 13px; color: var(--yz-color-text-muted, #6b7280); }
.yz-lcm__facts strong { font-size: 15px; font-weight: 900; color: var(--yz-color-heading, #101828); }
.yz-lcm__sep { width: 1px; height: 14px; background: var(--yz-color-border, #e5e7eb); }
.yz-lcm__rate {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 9999px;
  background: var(--yz-color-secondary-soft); color: var(--yz-color-secondary-strong);
  font-size: 12px; font-weight: 800;
}

.yz-lcm__side {
  display: flex; align-items: center; gap: 14px;
  padding-inline-start: 16px; border-inline-start: 1px solid var(--yz-color-border-soft, #f3f4f6);
}
.yz-lcm__price { display: flex; flex-direction: column; line-height: 1.45; text-align: left; }
.yz-lcm__price-label { font-size: 11.5px; color: var(--yz-color-text-muted, #6b7280); }
.yz-lcm__price strong { font-size: 16px; font-weight: 900; color: var(--yz-color-heading, #101828); white-space: nowrap; }
.yz-lcm .yz-lc__btn--icon { width: 42px; height: 42px; }
.yz-lcm .yz-lc__btn--icon svg { width: 17px; height: 17px; }
.yz-lcm[data-active="0"] .yz-lcm__visual { background: #2b3a52; }

/* کارت باریک (اسلایدر چندتایی، ستون کناری): بخش قیمت به ردیف دوم می‌رود */
@container (max-width: 460px) {
  .yz-lcm { grid-template-columns: auto minmax(0, 1fr); row-gap: 12px; padding: 12px; }
  .yz-lcm__visual { width: 60px; height: 60px; border-radius: 16px; }
  .yz-lcm__logo { width: 36px; height: 36px; border-radius: 11px; font-size: 14px; }
  .yz-lcm__side {
    grid-column: 1 / -1; justify-content: space-between;
    padding: 12px 4px 0; border-inline-start: 0; border-top: 1px solid var(--yz-color-border-soft, #f3f4f6);
  }
  .yz-lcm__price { flex-direction: row; align-items: baseline; gap: 8px; text-align: right; }
}
