/* ===== Currency Chart (clean/pro look) ===== */

.currency-chart {
  width: 95%;
  margin-top: 20px;
}

/* Header */
.currency-chart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.currency-chart__title {
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-size: 1.05rem;
}

/* Range buttons (tab-style) */
.currency-chart__ranges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.70);
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}

.currency-chart__range {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
  color: rgba(0,0,0,0.72);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, color 0.15s ease;
}

.currency-chart__range:hover {
  background: rgba(0,0,0,0.04);
}

.currency-chart__range:active {
  transform: translateY(1px);
}

.currency-chart__range:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}

/* Active tab */
.currency-chart__range.is-active {
  background: #fff;
  color: rgba(0,0,0,0.88);
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

/* Chart card */
.currency-chart__body {
  position: relative;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  padding: 16px; /* lidt mere luft */
  background:
    radial-gradient(900px 360px at 12% -12%, rgba(0,0,0,0.06), transparent 55%),
    radial-gradient(700px 300px at 92% 0%, rgba(0,0,0,0.035), transparent 55%),
    rgba(255,255,255,0.65);
  box-shadow: 0 12px 35px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Canvas sizing */
.currency-chart__canvas {
  display: block;
  width: 100%;
  height: 340px; /* lidt mere “premium” luft */
}

/* ===== Currency chart stats (under graph) ===== */

.currency-chart__stats {
  width: 100%;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.currency-chart__stat {
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.65);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
  min-width: 0;
}

.currency-chart__stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  margin-bottom: 6px;
  line-height: 1.1;
}

.currency-chart__stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(0,0,0,0.88);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.currency-chart__stat-sub {
  margin-top: 4px;
  font-size: 0.86rem;
  color: rgba(0,0,0,0.62);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Positive / negative / flat styling for change stat (JS will toggle these classes) */
.currency-chart__stat.is-up .currency-chart__stat-value,
.currency-chart__stat.is-up .currency-chart__stat-sub {
  color: #0a7a2f;
}

.currency-chart__stat.is-down .currency-chart__stat-value,
.currency-chart__stat.is-down .currency-chart__stat-sub {
  color: #b00020;
}

.currency-chart__stat.is-flat .currency-chart__stat-value,
.currency-chart__stat.is-flat .currency-chart__stat-sub {
  color: rgba(0,0,0,0.70);
}

/* Mobile height */
@media (max-width: 640px) {
  .currency-chart__canvas { height: 250px; }

  .currency-chart__range {
    font-size: 0.92rem;
    padding: 8px 11px;
  }

  .currency-chart__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .currency-chart__stat {
    padding: 10px 10px;
  }

  .currency-chart__stat-value {
    font-size: 1.02rem;
  }
}

/* Small phones: slightly tighter */
@media (max-width: 380px) {
  .currency-chart__stat-value {
    font-size: 0.98rem;
  }

}


/* Fallback overlay */
.currency-chart__fallback {
  position: absolute;
  inset: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  border: 1px dashed rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
}

.currency-chart.is-ready .currency-chart__fallback {
  display: none;
}

/* Force hide fallback when chart is ready (override any theme styles) */
.currency-chart.is-ready .currency-chart__fallback {
  display: none !important;
}

