/* Active-games switcher (controllers/game-switcher.js) and the toast action
   row (controllers/toast.js action option). Linked after styles-games.css. */

.game-header { grid-template-columns: auto auto auto 1fr auto; gap: 6px; }

.switcher-trigger { position: relative; }
.switcher-trigger.hidden { display: none; }
.switcher-trigger.switcher-needs-you { border-color: var(--accent); }
.switcher-badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 900;
  line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--panel);
}
@media (prefers-reduced-motion: no-preference) {
  .switcher-needs-you .switcher-badge { animation: switcher-pulse 1.6s ease-in-out infinite; }
}
@keyframes switcher-pulse { 50% { transform: scale(1.18); } }

.switcher-backdrop {
  position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; justify-content: center;
  background: var(--scrim);
}
.switcher-backdrop.hidden { display: none; }
.switcher-sheet {
  width: min(100vw, 480px); max-height: 82vh; overflow-y: auto; padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--panel); color: var(--ink);
  box-shadow: var(--shadow-md);
}
@media (min-width: 700px) { .switcher-backdrop { align-items: center; } .switcher-sheet { border-radius: var(--radius-lg); } }
.switcher-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.switcher-head h2 { margin: 0; font-size: 20px; }
.switcher-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.switcher-row > button {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; min-height: 56px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.switcher-row > button:disabled { cursor: default; opacity: 0.7; }
.switcher-row.needs-you > button { border-color: var(--accent); background: var(--danger-bg); }
.switcher-name { font-weight: 900; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher-status { grid-row: 2; color: var(--muted); font-size: 14px; }
.switcher-row.needs-you .switcher-status { color: var(--accent-strong); font-weight: 900; }
.switcher-seats { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 2px; }
.switcher-seats em { margin-left: 6px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; }
.switcher-empty, .switcher-note { color: var(--muted); font-size: 14px; }
.switcher-actions { display: grid; gap: 8px; margin-top: 12px; }

.toast-with-action { display: flex; align-items: center; gap: 10px; cursor: default; }
.toast-with-action > span { flex: 1; min-width: 0; }
.toast-action { min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.toast-dismiss { min-height: 36px; width: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
