/* NHL Dashboard — bento: stacks (wide) + goalies, then three player boards. */

/* ── Games ribbon ─────────────────────────────────────── */
.db-games {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.db-game {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 10px;
  padding: 12px 14px 12px; box-shadow: var(--ih-shadow);
  transition: transform var(--ih-fast) var(--ih-ease), border-color var(--ih-fast);
}
.db-game:hover { transform: translateY(-2px); border-color: var(--ice-line); }
.db-game-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); margin-bottom: 10px; }
.db-ou { color: var(--ice); font-weight: 700; }
.db-game-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; }
.db-side {
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 4px; align-items: center;
  padding-left: 8px; border-left: 3px solid var(--tc, var(--border));
}
.db-side b { font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.db-logo { width: 28px; height: 28px; object-fit: contain; }
.db-at { font-family: var(--ih-mono); color: var(--text-3); font-size: 12px; padding-top: 7px; }
.db-g { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.db-g-name { font-weight: 600; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-g .ih-badge { align-self: flex-start; }
.db-game-link {
  display: inline-block; margin-top: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--ice); text-decoration: none;
}
.db-game-link:hover { text-decoration: underline; }
.db-game-link:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

/* ── Bento ────────────────────────────────────────────── */
.db-bento {
  display: grid; gap: 14px; margin-top: 22px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.db-stacks  { grid-column: span 7; }
.db-goalies { grid-column: span 5; }
.db-top, .db-value, .db-lev { grid-column: span 4; }
.db-card-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px;
  border-bottom: 1px solid var(--ih-rule);
}
.db-card-head h2 { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.db-head-note { margin-left: auto; font-size: 10.5px; }
.db-more { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ice); text-decoration: none; }
.db-more:hover { text-decoration: underline; }

/* Stacks card gets the ice treatment — it's the page's anchor. */
.db-stacks {
  background:
    linear-gradient(180deg, var(--ice-dim), transparent 120px),
    var(--bg-card);
  border-color: var(--ice-line);
}
.db-stack-list { list-style: none; margin: 0; padding: 6px 0; }
.db-stack {
  display: grid; grid-template-columns: 22px 22px minmax(0, 1fr) auto 130px; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--ih-rule);
}
.db-stack:last-child { border-bottom: 0; }
.db-stack:first-child .db-rank { color: var(--ice); }
.db-rank { font-size: 15px; font-weight: 700; color: var(--text-3); text-align: center; }
.db-stack-head { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.db-stack-head .ih-dim { font-size: 12px; }
.db-stack-players { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-stack-nums { display: flex; flex-direction: column; align-items: flex-end; font-size: 11.5px; color: var(--text-2); }
.db-stack-nums span:last-child { color: var(--text-1); font-weight: 600; }

/* ── Tables ───────────────────────────────────────────── */
.db-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.db-table th {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3);
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ih-rule);
}
.db-table td { padding: 7px 10px; border-bottom: 1px solid var(--ih-rule); vertical-align: middle; }
.db-table tr:last-child td { border-bottom: 0; }
.db-table tbody tr { transition: background var(--ih-fast); }
.db-table tbody tr:hover { background: var(--ih-cell); }
.db-table .r { text-align: right; }
.db-table th:first-child, .db-table td:first-child { padding-left: 16px; }
.db-table th:last-child, .db-table td:last-child { padding-right: 16px; }
.db-hl { color: var(--ice); font-weight: 700; }
.db-pl { display: flex; align-items: center; gap: 9px; min-width: 0; }
.db-pl > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.db-pl b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-pl .ih-dim { font-size: 10.5px; }
.db-pl .ih-badge { align-self: flex-start; }
.db-tag {
  display: inline-block; font-family: var(--ih-mono); font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px; margin-right: 3px; background: var(--ih-cell); color: var(--text-2);
}
.db-tag.pp { background: var(--goal-dim); color: var(--goal); }

.db-tabs { margin-left: auto; display: flex; gap: 2px; background: var(--ih-cell); border-radius: 7px; padding: 2px; }
.db-tabs button {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font-family: var(--ih-mono); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 5px;
  transition: background var(--ih-fast), color var(--ih-fast);
}
.db-tabs button:hover { color: var(--text-1); }
.db-tabs button.active { background: var(--bg-card); color: var(--ice); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.db-tabs button:focus-visible { outline: 2px solid var(--ice); outline-offset: 1px; }

@media (max-width: 1180px) {
  .db-stacks, .db-goalies { grid-column: span 12; }
  .db-top, .db-value, .db-lev { grid-column: span 6; }
  .db-lev { grid-column: span 12; }
}
@media (max-width: 720px) {
  .db-top, .db-value, .db-lev { grid-column: span 12; }
  .db-stack { grid-template-columns: 20px 22px minmax(0, 1fr) 84px; }
  .db-stack-nums { display: none; }
  .db-games { grid-template-columns: 1fr; }
  .db-table { font-size: 12px; }
  .db-table th:nth-child(2), .db-table td:nth-child(2) { display: none; }
}
