/* -------------------------------------------------------- */
/* 🔹 Historical Price Chart Card                           */
/* -------------------------------------------------------- */
/* Period tabs, the year row, chart, statistics and the      */
/* unusually high/negative counts                            */
/* Mirrors historical_price_chart_card.dart                  */


/* -------------------------------------------------------- */
/* 🔹 Tabs                                                  */
/* -------------------------------------------------------- */
/* Equal-width tabs that fill the card — five periods and    */
/* every year fit on a phone                                 */

.historical-price-chart-card__tabs .tab-selector__tab {
  flex: 1 1 0;
  min-width: 0;
  padding-inline: var(--space-xs);
}

.historical-price-chart-card__tabs[hidden] {
  display: none;
}


/* -------------------------------------------------------- */
/* 🔹 Empty and error state                                 */
/* -------------------------------------------------------- */

/* Styled like the chart error overlay */
.historical-price-chart-card__message {
  height: 370px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  padding-inline: var(--space-l);
}


/* -------------------------------------------------------- */
/* 🔹 Unusually high and negative prices                    */
/* -------------------------------------------------------- */
/* Mirrors price_extremes_stats.dart                         */

.historical-price-chart-card__extremes {
  display: flex;
  flex-direction: column;
  padding-inline: var(--space-l);
}

.historical-price-chart-card__extreme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding: var(--space-s) var(--space-m);
}

.historical-price-chart-card__extreme + .historical-price-chart-card__extreme {
  border-top: 1px solid var(--color-divider);
}

.historical-price-chart-card__extreme-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
}

.historical-price-chart-card__extreme-title {
  font-size: var(--text-body-medium);
  color: var(--color-on-surface);
}

.historical-price-chart-card__extreme-subtitle {
  font-size: var(--text-body-small);
  color: var(--color-on-surface-variant);
}

.historical-price-chart-card__count {
  font-size: var(--text-body-medium);
  font-weight: var(--text-title-weight);
  white-space: nowrap;
}

.historical-price-chart-card__count--high {
  color: var(--color-price-red);
}

.historical-price-chart-card__count--negative {
  color: var(--color-secondary);
}

@media (max-width: 767px) {
  .historical-price-chart-card__extremes {
    padding-inline: 0;
  }
}
