/* ─── Market Detail Hero — modifier for .balance-card ───────────────────── */
/* Tighter left-panel padding than dashboard default (2.5rem).               */
.market-detail-hero .balance-hero-left {
  padding: 2rem 2.5rem 0;
}

/* Back link — small nav element at the top of the hero left panel */
.market-back-link {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-dark);
  opacity: 0.5;
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.market-back-link:hover {
  opacity: 0.8;
  text-decoration: none;
  color: var(--color-dark);
}

/* ─── OHLC chart container ───────────────────────────────────────────────── */
#ohlc-chart-container {
  height: 400px;
  width: 100%;
  border: 1px solid var(--color-grey-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Shimmer placeholder — fills chart area while JS loads the chart */
.md-chart-shimmer {
  height: 400px;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
}

/* ─── Analysis sub-components ────────────────────────────────────────────── */
/* _price_ladder, _rsi_card, _asset_valuations_card render their own Bootstrap
   card wrapper — flatten and restyle to match md-card when nested inside one  */
.md-card .analysis-card.card {
  border: none;
  box-shadow: none;
  margin-bottom: 0;
  border-radius: 0;
}

.md-card .analysis-card.card .card-body {
  padding: 1.5rem 1.75rem;
}

/* Style the sub-component title to match md-card-header h6 */
.md-card .analysis-card.card .card-subtitle {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-dark);
  opacity: 1;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-grey-dark);
  margin-bottom: 1.25rem;
}

/* ─── Chart empty / error state ──────────────────────────────────────────── */
.chart-empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  min-height: 400px;
  padding: 2rem;
}

.chart-empty-state .error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.chart-empty-state h4 {
  color: var(--color-dark, #374151);
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.chart-empty-state p {
  color: var(--color-dark, #6b7280);
  opacity: 0.7;
  margin-bottom: 0;
  font-size: var(--text-sm);
}

/* ─── Trading hours ──────────────────────────────────────────────────────── */
.md-card .trading-hours-schedule .border-bottom:last-child {
  border-bottom: none !important;
}

/* ─── Positions table ────────────────────────────────────────────────────── */
.md-card .table-responsive-nested {
  margin-bottom: 0;
}
