/* Game help — small "?" popover explaining a mini game's rules.
 * ---------------------------------------------------------------------- */

@layer modules {
  .game-help {
    position: relative;
  }

  .game-help summary {
    align-items: center;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    height: 1.5rem;
    justify-content: center;
    list-style: none;
    width: 1.5rem;
  }

  .game-help summary::-webkit-details-marker {
    display: none;
  }

  .game-help[open] summary {
    background-color: var(--color-ink);
    color: var(--color-ink-inverted);
  }

  .game-help__panel {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    font-size: var(--text-small);
    left: 0;
    padding: var(--space-s);
    position: absolute;
    top: calc(100% + 0.375rem);
    width: min(26rem, 80vw);
    z-index: 20;
  }

  .game-help__panel ul {
    list-style: none;
    padding: 0;
  }
}
