/**
 * استایل نمودار قیمت نقره
 */

/* کانتینر اصلی */
.nh-price-chart-container {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.06);
}

/* هدر نمودار */
.nh-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.nh-chart-title {
  margin: 0;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #333;
}

/* کنترل‌های نمودار (dropdown + refresh) */
.nh-chart-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* لیست کشویی تایم‌فریم */
.nh-chart-purity,
.nh-chart-timeframe {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  min-width: 100px;
}

.nh-chart-purity::picker(select),
.nh-chart-timeframe::picker(select) {
  appearance: base-select;
}

.nh-chart-purity:hover,
.nh-chart-timeframe:hover {
  background: #e8e8e8;
  border-color: #ccc;
}

/* دکمه رفرش */
.nh-chart-refresh {
  border: none;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.nh-chart-refresh:hover {
  background: #e8e8e8 !important;
  border-color: #2271b1 !important;
}

.nh-refresh-icon {
  display: block;
  transition: transform 0.3s ease;
}

.nh-chart-refresh:hover .nh-refresh-icon {
  transform: rotate(180deg);
}

/* کانواس نمودار */
.nh-chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  transition: opacity 0.3s ease;
}

.nh-chart-canvas-wrapper canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* آمار */
.nh-chart-stats {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  justify-content: center;
}

.nh-stat-item {
  border-radius: 6px;
  padding-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.nh-stat-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
}

.nh-stat-value {
  font-size: 0.75rem;
  font-weight: 700;
  direction: rtl;
}

.nh-stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  margin-right: 8px;
  color: #707070;
}

.nh-stat-change .nh-change-sign {
  font-size: 16px;
  font-weight: 700;
}

.nh-stat-change .nh-change-value {
  font-size: 14px;
}

.nh-stat-change .nh-change-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

/* حذف background سبز/قرمز */
.nh-stat-change.positive,
.nh-stat-change.negative {
  background: none;
}

/* لودینگ */
.nh-chart-loading {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 14px;
}

.nh-chart-loading .spinner {
  float: none;
  margin: 0 auto 10px;
}

/* پیام عدم وجود داده */
.nh-chart-no-data {
  text-align: center;
  padding: 40px 20px;
  background: #f9f9f9;
  border-radius: 6px;
  color: #666;
  font-size: 15px;
}

.nh-chart-no-data p {
  margin: 0;
}

/* پیام خطا */
.nh-chart-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 15px;
  color: #991b1b;
  text-align: center;
  font-size: 14px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .nh-chart-canvas-wrapper {
    height: 210px;
  }
  .nh-chart-title {
    font-size: 18px;
  }

  .nh-chart-tabs {
    gap: 8px;
  }

  .nh-chart-tab {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 70px;
  }

  .nh-chart-refresh {
    padding: 8px 12px;
    font-size: 16px;
  }

  .nh-stat-value {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .nh-chart-tabs {
    flex-direction: column;
  }

  .nh-chart-tab {
    width: 100%;
  }

  .nh-chart-refresh {
    width: 100%;
    margin-right: 0;
  }
  table td, table th{
      padding: 5px!important;
  }
  .nh-price-table tr{
      font-size:1rem !important;
      margin: 0 0.5rem !important;
  }
  
}

/* ==========================================================================
   جداول آماری قیمت نقره
   [nh_silver_price_stats] | [nh_silver_performance] | [nh_silver_ema] | [nh_silver_sma]
   ========================================================================== */

/* هدر جدول */
.nh-table-header {
  text-align: center;
  background: #201940;
  padding: 1rem;
  font-size: 1.125rem;
}

.nh-table-title-fa {
  color: #F7F7F7;
}

.nh-table-title-en {
  color: #C9BA91;
}

/* جدول */
table td, table th{
    border: none!important;
    background: none!important;
}
.nh-price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

/* هر سطر به‌صورت flex با space-between */
.nh-price-table tr {
  margin: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  padding: 2px 0;
  font-size: 1.125rem;
  gap: 8px;
}

.nh-price-table tr:last-child {
  border-bottom: none;
}

/* ستون برچسب (راست در RTL) */
.nh-price-table td:first-child {
  color:#2E2929;
  flex-shrink: 0;
}

/* ستون مقدار (چپ در RTL) */
.nh-price-table td:last-child {
  /*font-size: 1.125rem;*/
}

/* رنگ مثبت/منفی */
.nh-positive {
  color: #01D320;
}

.nh-negative {
  color: #F44336;
}
.nh-positive,.nh-negative{
    display: flex;
}
