/* TRD v272: player cards large enough to read, on a desktop and on a phone.
 *
 * Every tool's player card printed its stats at 10-13 px. Rather than editing dozens of
 * per-card font sizes, each card is scaled as a whole with CSS zoom, so every label, stat,
 * badge and chart grows together and keeps its hierarchy. Any explicit size a card already
 * had is divided by the scale, so the card still fits the screen. A browser without zoom
 * support skips this file's rules and keeps the previous size.
 */
:root { --pc-zoom: 1.28; --pc-side-zoom: 1.28; }
@media (max-width: 760px) { :root { --pc-zoom: 1.25; } }

@supports (zoom: 1.2) {
  /* Season-long fantasy card (fantasy.html): a centred dialog. */
  section.detail[role="dialog"] {
    zoom: var(--pc-zoom);
    width: calc(min(1120px, 100vw - 32px) / var(--pc-zoom));
    max-height: calc((100dvh - 32px) / var(--pc-zoom));
  }

  /* Mock draft prospect card (mock_draft.html): a dialog inside a centring overlay. */
  #playerModal .player-modal {
    zoom: var(--pc-zoom);
    width: calc(min(1180px, 100vw - 32px) / var(--pc-zoom));
    max-width: none;
    max-height: calc((100dvh - 32px) / var(--pc-zoom));
  }

  /* Big Board card (upside.html): a wider side column on a desktop... */
  .bb-layout.with-card { grid-template-columns: minmax(0, 1fr) 640px; }
  #card.card {
    zoom: var(--pc-side-zoom);
    top: calc(112px / var(--pc-side-zoom));
    max-height: calc((100vh - 124px) / var(--pc-side-zoom));
  }

  /* Draft class player card (draft_classes.html): rendered inline beside the class. */
  #player-card .player-card { zoom: 1.18; }

  /* ...and on smaller screens, the whole screen. */
  @media (max-width: 1180px) {
    #card.card {
      zoom: var(--pc-zoom);
      inset: 0 auto auto 0;
      width: calc(100vw / var(--pc-zoom));
      height: calc(100dvh / var(--pc-zoom));
      max-height: none;
      top: 0;
    }
  }
  @media (max-width: 760px) {
    section.detail[role="dialog"],
    #playerModal .player-modal {
      width: calc(100vw / var(--pc-zoom));
      height: calc(100dvh / var(--pc-zoom));
      max-height: none;
      border-radius: 0;
    }
    section.detail[role="dialog"] { padding: 14px; }
  }
}
