/* صفحه قیمت حرفه‌ای — سازگار با پالت */

/* تیکر قیمت صفحه اصلی */
.live-price-ticker {
  --ticker-gap: .75rem;
  position: relative;
  overflow: hidden;
  margin: .15rem 0 .45rem;
  padding: .55rem 0;
  user-select: none;
  background: linear-gradient(90deg, rgba(var(--brand-rgb, 16,13,209), .06), rgba(255,255,255,.5), rgba(var(--brand-rgb, 16,13,209), .06));
  border-radius: 1rem;
  border: 1px solid rgba(var(--brand-rgb, 16,13,209), .08);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.live-price-ticker-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: liveTickerTrain 40s linear infinite;
}
.live-price-ticker:hover .live-price-ticker-track {
  animation-play-state: paused;
}
.live-price-group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--ticker-gap);
  padding-inline-end: var(--ticker-gap);
}
.live-price-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e8ebf5);
  border-radius: 999px;
  padding: .42rem .8rem;
  box-shadow: 0 4px 14px rgba(15, 15, 40, .05);
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, border-color .15s ease, color .2s ease;
}
.live-price-chip:hover {
  border-color: rgba(var(--brand-rgb), .35);
  color: inherit;
  transform: translateY(-1px);
}
.live-price-chip .chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand, #100DD1);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .14);
  flex-shrink: 0;
}
.live-price-chip .chip-name {
  font-size: .68rem;
  color: var(--muted, #747794);
  line-height: 1.1;
  font-weight: 600;
}
.live-price-chip .chip-val {
  font-weight: 700;
  color: var(--brand, #100DD1);
  font-size: .86rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.live-price-chip .chip-chg {
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .35rem;
  border-radius: 999px;
}
.live-price-chip .chip-chg.is-up { background: #ecfdf5; color: #059669; }
.live-price-chip .chip-chg.is-down { background: #fef2f2; color: #dc2626; }
.live-price-chip .chip-chg.is-flat { background: #f3f4f6; color: #6b7280; }

@keyframes liveTickerTrain {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-25%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .live-price-ticker-track { animation: none; }
}

html[theme-color="dark"] .live-price-ticker {
  background: linear-gradient(90deg, rgba(var(--brand-rgb), .16), rgba(26,32,53,.7), rgba(var(--brand-rgb), .16));
  border-color: rgba(var(--brand-rgb), .22);
}

.prices-pro-page .prices-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.2rem 1.25rem;
  border-radius: 1.15rem;
  /* رنگ از theme-palette (--hero-*) */
}
.prices-hero-eyebrow {
  display: block;
  font-size: .75rem;
  opacity: .85;
  margin-bottom: .2rem;
}
.prices-hero h5 { margin: 0; color: #fff; }
.prices-hero .opacity-90,
.prices-hero .text-muted { color: rgba(255,255,255,.88) !important; }
.prices-hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.prices-hero-actions .btn-light {
  color: var(--brand, #100DD1);
  border: 0;
  font-weight: 600;
}

.price-mode-tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.price-mode-tab {
  border: 1px solid var(--border, #e5e7ef);
  background: var(--card, #fff);
  color: var(--text, #1d2433);
  border-radius: 999px;
  padding: .4rem .85rem;
  font-size: .8rem;
  font-weight: 600;
}
.price-mode-tab.is-active {
  background: var(--brand, #100DD1);
  border-color: var(--brand, #100DD1);
  color: #fff;
}

.price-live-card {
  background: var(--card, #fff);
  color: var(--text, #1d2433);
  border-radius: 1rem;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 8px 24px rgba(15, 15, 40, .06);
  border: 1px solid var(--border, transparent);
  height: 100%;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.price-live-card:hover { transform: translateY(-2px); }
.price-live-card.is-active {
  border-color: rgba(var(--brand-rgb, 16,13,209), .5);
  box-shadow: 0 12px 28px rgba(var(--brand-rgb, 16,13,209), .16);
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb, 16,13,209), .08), transparent 55%),
    var(--card, #fff);
}
.price-live-label {
  display: block;
  font-size: .82rem;
  color: var(--muted, #747794);
  margin-bottom: .35rem;
}
.price-live-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand, #100DD1);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.price-live-value .price-currency {
  font-size: .85rem;
  font-weight: 700;
  opacity: .85;
}
.price-live-unit { font-size: .78rem; color: var(--muted, #9aa0b5); margin-top: .15rem; }
.price-live-change {
  font-size: .85rem;
  font-weight: 600;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: var(--brand-soft, #f3f4f6);
  color: var(--muted, #6b7280);
}
.price-live-change.is-up { background: #ecfdf5; color: #059669; }
.price-live-change.is-down { background: #fef2f2; color: #dc2626; }
.price-live-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .85rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border, #eef0f5);
  gap: .5rem;
}

.price-chart-card {
  background: var(--card, #fff);
  color: var(--text, #1d2433);
  border-radius: 1.15rem;
  padding: 1.15rem 1.2rem 1rem;
  box-shadow: 0 10px 30px rgba(15, 15, 40, .07);
  border: 1px solid var(--border, transparent);
}
.price-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.price-chart-filters {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}
.price-chart-filters .form-select {
  min-width: 140px;
  border-radius: .75rem;
  border-color: rgba(var(--brand-rgb, 16,13,209), .22);
}
.price-chart-filters .form-select:focus {
  border-color: var(--brand, #100DD1);
  box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb, 16,13,209), .2);
}
.price-chart-wrap {
  position: relative;
  height: 280px;
}
.price-chart-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--muted, #747794);
  font-size: .9rem;
  background: rgba(255, 255, 255, .55);
  border-radius: .85rem;
  z-index: 2;
  pointer-events: none;
}
.price-chart-msg[hidden] {
  display: none !important;
}
html[theme-color="dark"] .price-chart-msg {
  background: rgba(16, 20, 40, .72);
  color: var(--text, #c8cde0);
}
.price-chart-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
  margin-top: 1rem;
}
.price-chart-stats > div {
  background: var(--brand-soft, #eef0ff);
  border-radius: .85rem;
  padding: .65rem .7rem;
  text-align: center;
}
.price-chart-stats span {
  display: block;
  font-size: .72rem;
  color: var(--muted, #747794);
  margin-bottom: .15rem;
}
.price-chart-stats strong {
  color: var(--brand, #100DD1);
  font-variant-numeric: tabular-nums;
  font-size: .95rem;
}

html[theme-color="dark"] .price-live-card,
html[theme-color="dark"] .price-chart-card,
html[theme-color="dark"] .price-mode-tab {
  background: var(--card, #1a1f36);
  border-color: var(--border, #2a314d);
  color: var(--text, #e8eaf2);
}
html[theme-color="dark"] .price-live-card.is-active {
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb, 16,13,209), .18), transparent 55%),
    var(--card, #1a1f36);
}
html[theme-color="dark"] .price-live-meta {
  border-color: var(--border, #2a314d);
}
html[theme-color="dark"] .price-chart-stats > div {
  background: rgba(var(--brand-rgb, 16,13,209), .16);
}

@media (max-width: 575.98px) {
  .price-chart-stats { grid-template-columns: repeat(2, 1fr); }
  .price-chart-filters .form-select { min-width: 120px; flex: 1; }
}
