/* Keep each Trends page connected to its selected navigation tab. */
.dt-trends-tabs {
  margin-bottom: 0;
}

.dt-trends-panel {
  background-color: var(--dt-bg-card);
  border: 1px solid var(--dt-border);
  border-top: 0;
}

.dt-trends-panel .dt-trends-section {
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.dt-trends-panel > :not(:first-child) {
  border-top: 1px solid var(--dt-border);
}

.dt-trends-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dt-trends-columns > .dt-trends-section + .dt-trends-section {
  border-left: 1px solid var(--dt-border);
}

.dt-trends-section .dt-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.dt-trends-section .dt-select {
  max-width: 100%;
}

.dt-trends-section .dt-form-group {
  min-width: 0;
  max-width: 100%;
}

.dt-trends-panel > .dt-trend-detail-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 0;
}

.dt-trend-detail-panel > .dt-trends-section.dt-trend-chart {
  padding-bottom: 0;
}

html[data-theme="dark"] .dt-trend-detail-panel .apexcharts-xaxis-texts-g text,
html[data-theme="dark"] .dt-trend-detail-panel .apexcharts-yaxis-texts-g text,
html[data-theme="dark"] .dt-trend-detail-panel .apexcharts-yaxis-title text {
  /* Override the shared ApexCharts text rule for these dark-mode axes. */
  fill: var(--dt-text-primary) !important;
}

.dt-trend-detail-stats > .dt-stat-card {
  min-width: 0;
  padding: 0 1rem 1rem;
}

.dt-trend-detail-stats .dt-stat-label {
  color: var(--dt-text-primary);
}

@media (max-width: 840px) {
  .dt-trends-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .dt-trends-columns > .dt-trends-section + .dt-trends-section {
    border-left: 0;
    border-top: 1px solid var(--dt-border);
  }

  .dt-trends-panel .dt-trends-section {
    padding: 0.75rem;
  }

  .dt-trends-panel > .dt-trend-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dt-trend-detail-stats > .dt-stat-card {
    padding: 0 0.75rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .dt-trends-tabs .dt-tab {
    padding: 0.6rem 0.3rem;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
  }
}
