.game-info-open { overflow: hidden; }

.game-card-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 1px;
}

.game-info-button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted-light);
  cursor: pointer;
}

.game-info-button > .ui-icon { width: 18px; height: 18px; }

.game-info-button:hover,
.game-info-button:focus-visible { border-color: var(--accent); background: var(--panel3); color: var(--text); }

@media (max-width: 720px) {
  /* The bar also carries the players on the left, so the two buttons are compact on a phone's ~110px tile. */
  .game-card-actions { gap: 2px; }
  .game-info-button,
  .favorite-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
  }
  .game-info-button > .ui-icon,
  .favorite-button svg { width: 16px; height: 16px; }
}

.game-info-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
  background: color-mix(in srgb, var(--bg-deep) 48%, transparent);
}

.game-info-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.game-info-drawer {
  position: relative;
  width: min(430px, 100%);
  height: 100%;
  padding: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  box-shadow: -18px 0 48px color-mix(in srgb, var(--bg-deep) 72%, transparent);
}

.game-info-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.game-info-header > div { min-width: 0; flex: 1; }
.game-info-header h2 { margin: 3px 0 0; font-size: 1.7rem; line-height: 1.15; }
.game-info-kicker { color: var(--accent); font-size: .77rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.game-info-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}
.game-info-close:hover { background: var(--panel3); }
.game-info-close > .ui-icon { width: 20px; height: 20px; }

.game-info-description { margin: 16px 0; color: var(--muted-light); line-height: 1.55; }
.game-info-facts, .game-info-stakes { display: grid; gap: 0; margin: 0; }
.game-info-facts > div, .game-info-stakes > div {
  display: grid;
  grid-template-columns: minmax(105px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.game-info-facts dt, .game-info-stakes dt { color: var(--muted); }
.game-info-facts dd, .game-info-stakes dd { margin: 0; overflow-wrap: anywhere; color: var(--text); font-weight: 700; text-align: right; }
.game-info-facts .game-info-emphasis dd { color: var(--accent); font-variant-numeric: tabular-nums; }
.game-info-help, .game-info-empty { margin: 10px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.game-info-section { margin-top: 24px; }
.game-info-section h3 { margin: 0 0 4px; font-size: 1.08rem; }
.game-info-actions {
  position: sticky;
  bottom: -22px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 9px;
  margin: 26px -22px -22px;
  padding: 15px 22px calc(15px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
}
/* Without favourites (a brand switch) the play button takes the whole row. */
.game-info-actions > :only-child { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .game-info-layer { align-items: flex-end; justify-content: stretch; }
  .game-info-drawer {
    width: 100%;
    height: min(82dvh, 720px);
    padding: 18px 16px;
    border-top: 1px solid var(--line);
    border-left: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 48px color-mix(in srgb, var(--bg-deep) 72%, transparent);
  }
  .game-info-header h2 { font-size: 1.45rem; }
  .game-info-actions { bottom: -18px; margin: 22px -16px -18px; padding-right: 16px; padding-left: 16px; }
}

@media (max-width: 380px) {
  .game-info-facts > div, .game-info-stakes > div { grid-template-columns: 1fr; gap: 2px; }
  .game-info-facts dd, .game-info-stakes dd { text-align: left; }
  .game-info-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .game-info-layer, .game-info-drawer { scroll-behavior: auto; }
}

html[dir="rtl"] .game-info-layer { justify-content: flex-start; }
html[dir="rtl"] .game-info-drawer { border-right: 1px solid var(--line); border-left: 0; box-shadow: 18px 0 48px color-mix(in srgb, var(--bg-deep) 72%, transparent); }
html[dir="rtl"] .game-info-facts dd,
html[dir="rtl"] .game-info-stakes dd { text-align: left; }

@media (max-width: 640px) {
  html[dir="rtl"] .game-info-layer { justify-content: stretch; }
  html[dir="rtl"] .game-info-drawer { border-right: 0; border-top: 1px solid var(--line); }
}
