/*
 * Kwalee BI — Home landing page styles
 *
 * Dashboard cards and list rows use content-hub.css classes directly.
 * This file only defines home-specific layout, section headings,
 * the parent-label badge, and the grid/list mode switching.
 */

/* ================================================================== */
/* PAGE WRAPPER                                                        */
/* ================================================================== */
.home-page {
  padding: 48px 40px 64px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ================================================================== */
/* HERO                                                                */
/* ================================================================== */
.home-hero {
  margin-bottom: 48px;
}

.home-hero__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-hero__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.home-hero__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ================================================================== */
/* SECTIONS                                                            */
/* ================================================================== */
.home-dashboard-sections {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-section__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

/* ================================================================== */
/* NAV CARD OVERRIDES                                                  */
/* Extends .content-hub-card so the whole element is a clickable link */
/* ================================================================== */
a.home-nav-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.home-nav-card:hover {
  border-color: rgba(234, 179, 8, 0.45);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

a.home-nav-card:focus-visible {
  outline: 2px solid var(--accent, #eab308);
  outline-offset: 2px;
}

/* Card body is informational only — no own hover link style */
.home-nav-card__body {
  pointer-events: none;
}

/* ================================================================== */
/* PARENT BADGE                                                        */
/* Shows the immediate parent sub-group for nested dashboards         */
/* ================================================================== */
.home-parent-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent, #eab308);
  background: rgba(234, 179, 8, 0.12);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Inline variant used in list rows */
.home-parent-badge--inline {
  margin-left: 8px;
  vertical-align: middle;
}

/* ================================================================== */
/* LIST VIEW — column override for the 3-column home list             */
/* ================================================================== */
.home-section-list.content-hub-list .home-list-header,
.home-section-list.content-hub-list .content-hub-list-row {
  grid-template-columns: 110px 1fr 1fr;
}

.home-list-header {
  grid-template-columns: 110px 1fr 1fr;
}

.home-list-type-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ================================================================== */
/* MODE SWITCHING                                                      */
/* Grid mode: show .home-section-grid, hide .home-section-list        */
/* List mode: hide .home-section-grid, show .home-section-list        */
/* ================================================================== */

/* Default: card grid on, list off */
.home-section-list {
  display: none;
}

.home-section-grid {
  display: grid; /* content-hub-grid already sets this, but be explicit */
}

/* List mode active */
.home-dashboard-sections--list .home-section-grid {
  display: none;
}

.home-dashboard-sections--list .home-section-list {
  display: flex;
  flex-direction: column;
}

/* ================================================================== */
/* EMPTY STATE                                                         */
/* ================================================================== */
.home-empty {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ================================================================== */
/* RESPONSIVE                                                          */
/* ================================================================== */
@media (max-width: 640px) {
  .home-page {
    padding: 32px 16px 48px;
  }

  .home-hero__header {
    flex-wrap: wrap;
  }
}

