/* Cardstop V70 — D / M / Year Market Index controls and scoped refinements. */
.market-status[data-state="fallback"]::before {
  background: #f2b740;
  box-shadow: 0 0 0 4px rgba(242, 183, 64, .16);
}

.market-area {
  fill: url(#market-area-gradient-v70);
}

.market-toolbar {
  grid-template-columns:
    minmax(112px, .65fr)
    minmax(210px, 1.55fr)
    minmax(150px, .85fr)
    minmax(190px, 1.05fr)
    minmax(118px, .66fr);
  align-items: end;
}

.market-field select:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.market-scale-control {
  min-width: 0;
}

.market-scale-control > span {
  display: block;
  margin: 0 0 6px 3px;
  color: #777b80;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .11em;
}

.market-scale-options {
  height: 44px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border: 1px solid #d8d9d7;
  border-radius: 10px;
  background: #f8f8f6;
}

.market-scale-options button {
  min-width: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #73777d;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}

.market-scale-options button:hover,
.market-scale-options button.active {
  color: #fff;
  background: #111;
}

.market-refresh-control {
  display: flex;
  align-items: end;
}

.market-refresh-button {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #111;
  border-radius: 10px;
  color: #fff;
  background: #111;
  cursor: pointer;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
}

.market-refresh-button:hover {
  background: var(--mr);
  transform: translateY(-1px);
}

.market-refresh-button:disabled {
  cursor: wait;
  opacity: .55;
  transform: none;
}

.market-refresh-button i {
  font-size: 15px;
  font-style: normal;
  line-height: 1;
}

.market-summary-card small {
  white-space: normal;
  line-height: 1.45;
}

.market-summary-card [data-kpi-period] {
  font-variant-numeric: tabular-nums;
}

.market-chart-summary {
  margin: 15px 0 0;
  padding-top: 13px;
  border-top: 1px solid #2e3236;
  color: #90969c;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.6;
}

.market-chart-summary strong {
  color: #fff;
  font-weight: 900;
}

.market-method {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .market-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .market-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-refresh-control {
    grid-column: 2;
  }

  .market-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .market-summary-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .market-tape {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .market-ticker {
    scroll-snap-align: start;
  }

  .market-toolbar {
    grid-template-columns: 1fr;
  }

  .market-refresh-control {
    grid-column: auto;
  }

  .market-refresh-button {
    min-height: 46px;
  }

  .market-summary {
    display: flex;
    flex-wrap: wrap;
  }

  .market-summary-card,
  .market-summary-card:first-child {
    width: 50%;
    flex: 1 1 50%;
    grid-column: auto;
  }

  .market-summary-card:first-child {
    width: 100%;
    flex-basis: 100%;
  }

  .market-summary-card strong {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }

  .market-chart-summary {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-refresh-button,
  .market-scale-options button {
    transition: none;
  }
}
