/* Dashboard (hosts#show): banners, welcome + points, Played/Hosted switch, stats, lists,
   achievements and the bottom band. Also styles game_nights/_card and _lineup_tags. */

.gtf-dash {
  padding-bottom: 8px;
}

/* ---------- Banners ---------- */

.gtf-dash-banners {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gtf-dash-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  padding: 14px 14px 14px 20px;
  border-radius: var(--gtf-radius-card);
  background: var(--gtf-surface-2);
  box-shadow: inset 0 0 0 2px var(--gtf-orange);
}

.gtf-dash-banner__dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gtf-orange);
}

.gtf-dash-banner__text {
  flex: 1 1 260px;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.3;

  & strong {
    font-weight: 800;
  }
}

.gtf-dash-banner__detail {
  color: var(--gtf-text-2);
}

.gtf-dash-banner__btn {
  flex: none;
  padding: 12px 22px;
}

/* ---------- Welcome + coins ---------- */

.gtf-dash__top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
}

.gtf-dash__welcome {
  flex: 2 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--gtf-radius-card);
  background: var(--gtf-yellow);
  color: var(--gtf-ink);
}

.gtf-dash__hello {
  margin: 12px 0 0;
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.gtf-dash__welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gtf-dash-coins {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: var(--gtf-radius-card);
  background: var(--gtf-surface-2);
}

.gtf-dash-coins__row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gtf-dash-coins__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gtf-orange);
  color: var(--gtf-ink);
  font-size: 30px;
  font-weight: 900;
  box-shadow: inset 0 0 0 5px var(--gtf-yellow);
}

.gtf-dash-coins__value {
  font-size: clamp(56px, 7vw, 84px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.gtf-dash-coins__note {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--gtf-text-2);
}

/* ---------- Played / Hosted switch ---------- */

.gtf-dash__switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 8px;
  border-radius: 18px;
  background: var(--gtf-surface-2);
}

.gtf-dash__tab {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  border: 0;
  border-radius: var(--gtf-radius-card);
  background: var(--gtf-ink);
  color: var(--gtf-text-2);
  font-family: var(--gtf-font);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;

  &:hover {
    color: var(--gtf-cream);
  }

  &[aria-selected="true"] {
    background: var(--gtf-orange);
    color: var(--gtf-ink);
  }

  &:focus-visible {
    outline: 3px solid var(--gtf-yellow);
    outline-offset: 2px;
  }
}

.gtf-dash__tab-title {
  display: block;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.gtf-dash__tab-sub {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  opacity: 0.85;
}

.gtf-dash__tab-count {
  flex: none;
  padding: 4px 12px;
  border: 2px solid currentColor;
  border-radius: var(--gtf-radius-btn);
  font-family: var(--gtf-mono);
  font-size: 15px;
  font-weight: 500;
}

/* ---------- Stats ---------- */

.gtf-dash-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
  margin: 24px 0 0;
  font-size: 18px;
  color: var(--gtf-text-2);
}

.gtf-dash-stats__value {
  font-size: 22px;
  font-weight: 800;
  color: var(--gtf-cream);
}

/* ---------- Lists ---------- */

.gtf-dash__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 48px 40px;
  padding-top: 64px;
}

.gtf-dash__col {
  min-width: 0;
}

.gtf-dash__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.gtf-dash__head--baseline {
  align-items: baseline;
  margin-bottom: 20px;
}

.gtf-dash__h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.gtf-dash__more {
  font-size: 15px;
  font-weight: 600;
}

.gtf-dash__head-links {
  display: flex;
  gap: 16px;
}

.gtf-dash__count {
  font-family: var(--gtf-mono);
  font-size: 14px;
  color: var(--gtf-text-4);
}

.gtf-dash__sub {
  margin: 8px 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--gtf-text-2);
}

.gtf-dash__sub--spaced {
  margin: 28px 0 4px;
}

.gtf-dash__rows,
.gtf-dash__note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--gtf-text-4);
}

.gtf-dash__show-more {
  margin: 16px 0 0;
}

/* One hosted session (single game or game night, active or finished) */
.gtf-dash-session {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 18px;
  border-radius: var(--gtf-radius-card);
  background: var(--gtf-surface-2);
}

.gtf-dash-session--finished {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--gtf-surface-2);
}

.gtf-dash-session__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gtf-dash-session__main {
  flex: 1;
  min-width: 0;
}

.gtf-dash-session__title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;

  & .gtf-badge {
    vertical-align: middle;
    margin-left: 4px;
  }
}

.gtf-dash-session__meta {
  margin: 3px 0 0;
  font-family: var(--gtf-mono);
  font-size: 13px;
  color: var(--gtf-text-4);
}

.gtf-dash-session__actions {
  gap: 8px;
}

.gtf-dash-session__night-icon .gtf-game-icon {
  background: var(--gtf-yellow);
}

@media (max-width: 520px) {
  .gtf-dash-session__head {
    flex-wrap: wrap;
  }

  .gtf-dash-session__main {
    flex-basis: calc(100% - 64px);
  }
}

.gtf-dash__empty-action {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* A list row (played games, finished games) */
.gtf-dash-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 -12px;
  padding: 16px 12px;
  border-radius: var(--gtf-radius-card);
  box-shadow: inset 0 -2px 0 var(--gtf-surface-2);
  color: var(--gtf-cream);

  &:is(a):hover {
    background: var(--gtf-surface-2);
    color: var(--gtf-cream);
  }

  &:is(a):focus-visible {
    outline: 3px solid var(--gtf-yellow);
    outline-offset: 2px;
  }
}

.gtf-dash-row__main {
  flex: 1;
  min-width: 0;
}

.gtf-dash-row__title {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.gtf-dash-row__meta {
  display: block;
  margin-top: 3px;
  font-family: var(--gtf-mono);
  font-size: 13px;
  color: var(--gtf-text-4);
}

.gtf-dash-row__aside {
  flex: none;
  text-align: right;
}

.gtf-dash-row__result {
  display: block;
  font-size: 17px;
  font-weight: 800;
}

/* A hosted session card (active games, game nights) */
.gtf-dash-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: var(--gtf-radius-card);
  background: var(--gtf-surface-2);
  min-width: 0;
}

.gtf-dash-card--finished {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--gtf-surface-2);
}

.gtf-dash-card__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gtf-dash-card__main {
  flex: 1;
  min-width: 0;
}

.gtf-dash-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;

  & .gtf-badge {
    vertical-align: middle;
    margin-left: 4px;
  }
}

.gtf-dash-card__meta {
  margin: 3px 0 0;
  font-family: var(--gtf-mono);
  font-size: 13px;
  color: var(--gtf-text-4);
}

.gtf-dash-card__actions {
  gap: 8px;
}

.gtf-dash-card__night-icon .gtf-game-icon {
  background: var(--gtf-yellow);
}

@media (max-width: 520px) {
  .gtf-dash-card__head {
    flex-wrap: wrap;
  }

  .gtf-dash-card__main {
    flex-basis: calc(100% - 64px);
  }
}

/* Game night line-up as small icons */
.gtf-lineup-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gtf-lineup-icons__item {
  display: inline-flex;
}

/* game_nights/_lineup_tags */
.gtf-lineup-tag__setup {
  text-decoration: none;
}

/* ---------- Achievements ---------- */

.gtf-dash-achievements__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gtf-achievement {
  min-width: 0;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: var(--gtf-radius-card);
}

.gtf-achievement__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
}

.gtf-achievement__name {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.gtf-achievement__note {
  display: block;
  margin-top: 6px;
  font-family: var(--gtf-mono);
  font-size: 12px;
  line-height: 1.4;
}

.gtf-achievement__coins {
  display: block;
  margin-top: 8px;
  font-family: var(--gtf-mono);
  font-size: 12px;
  font-weight: 700;
  opacity: 0.8;
}

.gtf-achievement--earned {
  background: var(--gtf-surface-2);
  color: var(--gtf-cream);

  & .gtf-achievement__mark {
    background: var(--gtf-yellow);
    color: var(--gtf-ink);
  }
}

.gtf-achievement--hued {
  background: var(--game);
  color: var(--gtf-ink);

  & .gtf-achievement__mark {
    background: var(--gtf-ink);
    color: var(--game);
  }
}

.gtf-achievement--locked {
  background: var(--gtf-ink);
  color: var(--gtf-text-4);
  box-shadow: inset 0 0 0 2px var(--gtf-surface-2);

  & .gtf-achievement__mark {
    background: var(--gtf-surface-2);
    color: var(--gtf-text-4);
  }
}

/* ---------- Bottom band ---------- */

.gtf-dash__band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 2px solid var(--gtf-surface-2);
}

.gtf-dash__band-text {
  font-size: 18px;
  color: var(--gtf-text-2);
}

.gtf-dash__band-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-weight: 600;
}
