/* Keep colors and fonts in sync with theme.py */

/* "Hardwood" look: warm court-colored page, navy ink, basketball orange accent */
:root {
  --court: #F4EEE4;
  --ink: #1B2A41;
  --muted: #6E6658;
  --line: #E6DDCE;
  --orange: #E8590C;
  --condensed: "Barlow Condensed", Barlow, system-ui, sans-serif;
}

body {
  background: var(--court);
  color: var(--ink);
}

.mantine-AppShell-header {
  border-bottom: 3px solid var(--orange);
}

.mantine-AppShell-navbar {
  background: #FBF8F3;
  border-right: 1px solid var(--line);
}

.app-title {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.viz-card {
  border-color: var(--line) !important;
  border-top: 3px solid var(--ink) !important;
}

.card-title {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.card-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  vertical-align: 2px;
  border-radius: 50%;
  background: var(--orange);
}

.eyebrow {
  font-family: var(--condensed);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mantine-InputWrapper-label,
.control-label {
  font-family: var(--condensed);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Each view fills the window below the header, so the page never scrolls on desktop */
.dashboard {
  display: grid;
  gap: var(--mantine-spacing-md);
  height: calc(100dvh - var(--app-shell-header-height, 60px) - 2 * var(--mantine-spacing-md));
  min-height: 620px;
}

.similar-grid {
  grid-template-columns: 7fr 5fr;
  grid-template-rows: minmax(0, 3fr) minmax(0, 2fr);
  grid-template-areas:
    "map similar"
    "table table";
}

.groups-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "map map positions"
    "box scatter builds";
}

.viz-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.viz-body {
  flex: 1;
  min-height: 0;
  position: relative;
}

.table-body {
  overflow: auto;
}

.comparison-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.comparison-table th {
  white-space: nowrap;
  font-family: var(--condensed);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.comparison-table td:first-child {
  white-space: nowrap;
  font-weight: 500;
}

.comparison-table .chosen-row {
  background: var(--mantine-color-orange-0);
  box-shadow: inset 3px 0 0 var(--orange);
}

/* Scoreboard style */
.hero-number {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 12px;
  border-radius: 4px;
  background: var(--ink);
  color: #FFB25B;
  font-family: var(--condensed);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.source a {
  color: inherit;
}

/* Stack the cards on narrow screens and let the page scroll instead */
@media (max-width: 1100px) {
  .dashboard {
    height: auto;
    min-height: 0;
  }

  .similar-grid,
  .groups-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-template-areas: none;
  }

  .dashboard > .viz-card {
    grid-area: auto !important;
    height: 400px;
  }

  .similar-grid > .viz-card:last-child {
    height: auto;
  }
}

@media (max-width: 600px) {
  .dash-logo {
    display: none;
  }

  .title-group,
  .title-group > div {
    min-width: 0;
  }

  .app-title {
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
