/**
 * Admin dashboard (/admin/dashboard): blocks placed in the content region.
 *
 * The page's main content (sapa_common's .vov-dashboard card grid) and the
 * blocks placed for the dashboard (ids "gin_vov_dashboard_*", visible only on
 * /admin/dashboard) are siblings in .region-content, so the region itself
 * becomes the grid on that page. Everything else (local tasks, messages, the
 * .vov-dashboard grid) spans the full row.
 */
.region-content:has(> .vov-dashboard) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.region-content:has(> .vov-dashboard) > * {
  grid-column: 1 / -1;
  min-width: 0;
}

.region-content:has(> .vov-dashboard) > [id^="block-gin-vov-dashboard-"] {
  grid-column: auto;
  margin: 0;
  padding: 1rem;
  background: var(--gin-bg-layer, #fff);
  border: 1px solid var(--gin-border-color-layer, #e5e5e5);
  border-radius: 8px;
  overflow: hidden;
}

/* Block titles look like the .vov-dashboard__title of the cards above. */
.region-content:has(> .vov-dashboard) > [id^="block-gin-vov-dashboard-"] > h2 {
  margin: -1rem -1rem 1rem;
  padding: 1rem;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--gin-border-color-layer, #eee);
}

/* Highcharts containers. */
.region-content:has(> .vov-dashboard) .cms-dashboard-chart {
  width: 100%;
  min-height: 320px;
}

/* Google Trends widget: full row, fixed height. */
.region-content:has(> .vov-dashboard) > [id^="block-gin-vov-dashboard-trending-google-search"] {
  grid-column: 1 / -1;
}

.region-content:has(> .vov-dashboard) > [id^="block-gin-vov-dashboard-trending-google-search"] iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

/* "Thống kê" (articles_count_block) state list. */
.region-content:has(> .vov-dashboard) .dashboard-content-status-counts {
  margin: 0 0 0.75rem;
  padding: 0;
}

.region-content:has(> .vov-dashboard) .content-state .color {
  margin-right: 0.5rem;
}

@media screen and (max-width: 991px) {
  .region-content:has(> .vov-dashboard) {
    grid-template-columns: minmax(0, 1fr);
  }
}
