/* تجارت‌یار — استایل عمومی (شورت‌کدها + صفحهٔ محصول) */
:root{
  --tma-night:#14213D; --tma-gold:#C9A227; --tma-saffron:#E4572E;
  --tma-mint:#2A9D8F; --tma-border:#e7e9f0; --tma-ink:#111827;
}
.tma-wrap-public, .tma-rates-table, .tma-pp, .tma-single-rate{ font-family:"Vazirmatn", Tahoma, sans-serif; }

/* نشان بروزرسانی زنده زیر قیمت محصول */
.tma-price-extra{ display:block; margin-top:6px; font-size:12.5px; color:#6b7280; }
.tma-base-price{ margin-inline-end:10px; }
.tma-live-wrap{ display:inline-flex; align-items:center; gap:6px; }
.tma-live-dot{ width:8px; height:8px; border-radius:50%; background:var(--tma-mint); box-shadow:0 0 0 0 rgb(42 157 143 /.7); animation:tmaPulseF 1.8s infinite; }
@keyframes tmaPulseF{ 70%{ box-shadow:0 0 0 8px rgb(42 157 143 /0);} 100%{ box-shadow:0 0 0 0 rgb(42 157 143 /0);} }
.tma-live-wrap.tma-live-error .tma-live-dot{ background:var(--tma-saffron); animation:none; }

/* جدول ارزها — شورت‌کد */
.tma-rates-table{ border-radius:16px; overflow:hidden; border:1px solid var(--tma-border); }
.tma-theme-dark{ background:linear-gradient(150deg,#16223f,#1d3057); color:#eef1f7; }
.tma-theme-light{ background:#fff; color:var(--tma-ink); }
.tma-table-head{ display:flex; justify-content:space-between; align-items:center; padding:14px 18px; font-weight:700; background:rgb(0 0 0 /.12); }
.tma-theme-light .tma-table-head{ background:#f5f6fb; }
.tma-table-updated{ font-size:12px; opacity:.7; font-variant-numeric:tabular-nums; }
.tma-rate-row{ display:flex; align-items:center; gap:12px; padding:11px 18px; border-bottom:1px solid rgb(255 255 255 /.06); transition:background .15s; }
.tma-theme-light .tma-rate-row{ border-color:var(--tma-border); }
.tma-rate-row:hover{ background:rgb(201 162 39 /.08); }
.tma-rate-row:last-child{ border-bottom:none; }
.tma-coin-dot{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-inline-end:6px; vertical-align:middle; }
.tma-rate-name{ flex:1; font-size:14px; }
.tma-rate-name small{ opacity:.6; font-size:11px; margin-inline-start:6px; }
.tma-rate-values{ text-align:left; font-variant-numeric:tabular-nums; }
.tma-val-toman{ font-size:15px; font-weight:800; margin-inline-end:4px; }
.tma-theme-dark .tma-val-toman{ color:var(--tma-gold); }
.tma-theme-light .tma-val-toman{ color:var(--tma-night); }
.tma-rate-values i{ font-style:normal; font-size:11px; opacity:.7; }
.tma-val-rial{ display:block; font-size:11px; opacity:.65; }
.tma-table-foot{ padding:9px 18px; font-size:10.5px; opacity:.55; text-align:center; background:rgb(0 0 0 /.1); }
.tma-theme-light .tma-table-foot{ background:#f9fafc; }
.tma-sign{ letter-spacing:.2px; }
.tma-rate-row.tma-changed .tma-val-toman{ animation:tmaFlashF .8s ease; border-radius:6px; padding:0 6px; }
@keyframes tmaFlashF{ 0%{ background:rgb(201 162 39 /.4);} 100%{ background:transparent;} }

/* نمایش تکی */
.tma-single-rate{ font-weight:700; color:var(--tma-night); }

/* کارت قیمت محصول — شورت‌کد */
.tma-pp{ display:flex; flex-direction:column; gap:3px; border:1px solid var(--tma-border); border-radius:14px; padding:14px 18px; background:linear-gradient(180deg,#fff,#fafbfe); max-width:340px; }
.tma-pp-base{ font-size:12px; color:#8b93a7; }
.tma-pp-toman{ font-size:20px; color:var(--tma-night); }
.tma-pp-toman i{ font-style:normal; font-size:12px; color:var(--tma-gold); }
.tma-pp-rial{ font-size:11.5px; color:#99a1b3; font-variant-numeric:tabular-nums; }
.tma-pp-words{ font-size:11.5px; color:#6b7280; border-top:1px dashed var(--tma-border); padding-top:6px; margin-top:4px; }
.tma-pp-na{ font-size:12px; color:#99a1b3; }

/* ---------- ماشین‌حساب تبدیل ارز [tma_calculator] ---------- */
.tma-calc{ border:1px solid var(--tma-border); border-radius:16px; padding:18px; max-width:420px; }
.tma-theme-light.tma-calc{ background:linear-gradient(180deg,#fff,#f9fafd); }
.tma-theme-dark.tma-calc{ background:linear-gradient(150deg,#16223f,#1d3057); color:#eef1f7; border-color:rgb(255 255 255 /.1); }
.tma-calc-title{ font-weight:800; margin-bottom:12px; font-size:14px; }
.tma-calc-row{ display:flex; gap:8px; }
.tma-calc-amount{ flex:1; min-width:0; border:1px solid var(--tma-border); border-radius:10px; padding:10px 12px; font-size:15px; font-family:inherit; }
.tma-theme-dark .tma-calc-amount{ background:rgb(0 0 0 /.25); color:#fff; border-color:rgb(255 255 255 /.15); }
.tma-calc-currency{ border:1px solid var(--tma-border); border-radius:10px; padding:10px; font-family:inherit; max-width:180px; }
.tma-theme-dark .tma-calc-currency{ background:#1d3057; color:#fff; border-color:rgb(255 255 255 /.15); }
.tma-calc-result{ margin-top:14px; padding-top:12px; border-top:1px dashed var(--tma-border); }
.tma-theme-dark .tma-calc-result{ border-color:rgb(255 255 255 /.15); }
.tma-calc-toman{ display:block; font-size:22px; font-weight:800; font-variant-numeric:tabular-nums; }
.tma-theme-light .tma-calc-toman{ color:var(--tma-night); }
.tma-theme-dark .tma-calc-toman{ color:var(--tma-gold); }
.tma-calc-rial{ display:block; margin-top:3px; font-size:12px; opacity:.7; font-variant-numeric:tabular-nums; }
.tma-calc-foot{ margin-top:10px; font-size:10px; opacity:.5; text-align:center; }

/* ---------- نوار متحرک [tma_ticker] ---------- */
.tma-ticker{ overflow:hidden; border-radius:0; padding:10px 0; white-space:nowrap; position:relative; }
.tma-theme-dark.tma-ticker{ background:linear-gradient(90deg,#16223f,#1d3057); color:#e8ecf4; }
.tma-theme-light.tma-ticker{ background:#fff; color:var(--tma-ink); border-top:1px solid var(--tma-border); border-bottom:1px solid var(--tma-border); }
.tma-ticker-track{ display:inline-flex; gap:0; animation:tmaTicker var(--tma-speed,30s) linear infinite; will-change:transform; }
.tma-ticker:hover .tma-ticker-track{ animation-play-state:paused; }
@keyframes tmaTicker{ from{ transform:translateX(0);} to{ transform:translateX(-50%);} }
.tma-ticker-part{ display:inline-flex; }
.tma-tick{ display:inline-flex; align-items:center; gap:6px; padding:0 22px; border-inline-end:1px solid rgb(255 255 255 /.12); }
.tma-theme-light .tma-tick{ border-inline-end-color:var(--tma-border); }
.tma-tick b{ font-size:13px; }
.tma-tick i{ font-style:normal; font-size:10.5px; opacity:.6; }
.tma-tick u{ text-decoration:none; font-weight:800; font-variant-numeric:tabular-nums; font-size:13px; }
.tma-theme-dark .tma-tick u{ color:var(--tma-gold); }
.tma-theme-light .tma-tick u{ color:var(--tma-night); }
.tma-tick q{ quotes:none; font-size:10.5px; opacity:.6; }
.tma-tick.tma-tick-flash u{ animation:tmaFlashF .8s ease; border-radius:6px; padding:0 4px; }

/* ---------- کارت مقایسه با نمودار [tma_compare] ---------- */
.tma-compare{ border:1px solid var(--tma-border); border-radius:16px; overflow:hidden; max-width:640px; }
.tma-theme-light.tma-compare{ background:#fff; color:var(--tma-ink); }
.tma-theme-dark.tma-compare{ background:linear-gradient(150deg,#16223f,#1d3057); color:#eef1f7; border-color:rgb(255 255 255 /.1); }
.tma-cmp-head{ display:flex; justify-content:space-between; align-items:center; padding:13px 18px; font-weight:700; background:rgb(0 0 0 /.06); }
.tma-theme-light .tma-cmp-head{ background:#f5f6fb; }
.tma-cmp-row{ display:grid; grid-template-columns:140px 1fr 130px; gap:12px; align-items:center; padding:12px 18px; border-bottom:1px solid var(--tma-border); }
.tma-theme-dark .tma-cmp-row{ border-color:rgb(255 255 255 /.08); }
.tma-cmp-row:last-child{ border-bottom:none; }
@media (max-width:560px){ .tma-cmp-row{ grid-template-columns:110px 1fr 100px; gap:8px; } }
.tma-cmp-info{ display:flex; flex-direction:column; gap:2px; }
.tma-cmp-label{ font-size:13.5px; }
.tma-cmp-code{ font-size:10.5px; opacity:.6; }
.tma-cmp-chart{ height:22px; background:rgb(127 140 170 /.15); border-radius:999px; overflow:hidden; }
.tma-cmp-bar{ height:100%; min-width:4px; border-radius:999px;
  background:linear-gradient(90deg, var(--tma-gold), var(--tma-saffron)); transition:width .6s cubic-bezier(0.16,1,0.3,1); }
.tma-theme-dark .tma-cmp-chart{ background:rgb(255 255 255 /.1); }
.tma-cmp-sparkbox{ background:transparent; overflow:visible; }
.tma-spark{ width:100%; height:30px; display:block; }
.tma-cmp-values{ text-align:left; font-variant-numeric:tabular-nums; }
.tma-cmp-val{ font-size:14.5px; }
.tma-theme-dark .tma-cmp-val{ color:var(--tma-gold); }
.tma-cmp-values i{ font-style:normal; font-size:10.5px; opacity:.7; margin-inline-start:3px; }
.tma-cmp-rial{ display:block; font-size:10.5px; opacity:.65; }
.tma-cmp-row.tma-cmp-flash .tma-cmp-val{ animation:tmaFlashF .8s ease; border-radius:6px; padding:0 4px; }
.tma-cmp-foot{ font-size:10px; }

.tma-cmp-fx{ font-size:9.5px; background:rgb(20 33 61 /.12); border-radius:5px; padding:0 5px; font-weight:700; vertical-align:1px; }
.tma-theme-dark .tma-cmp-fx{ background:rgb(255 255 255 /.14); }

/* منبع نرخ (chip) */
.tma-src{ font-size:9.5px; background:rgb(201 162 39 /.15); color:var(--tma-gold);
  padding:1px 7px; border-radius:999px; margin-inline-start:6px; font-weight:700; }
