/* ==========================================================================
   TLO KARTY — okno wyboru (od 10.10.2026, banner.js)
   Okno = wzor statystyk (.sx-ovl / .sx-modal / .sx-hd / .sx-x w styles.css).
   Gora przypieta (podglad karty, kadry, szukajka), przewija sie tylko lista gier.
   Klasy z przedrostkiem „bnr-”.
   ========================================================================== */

.bnr-ovl { display: none; z-index: 5750; }
.bnr-ovl.on { display: flex; }
.bnr-modal { max-width: 760px; height: min(860px, 92vh); }
.bnr-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* --- GORA PRZYPIETA --- */
.bnr-pin {
  flex: 0 0 auto; position: relative; z-index: 1;
  display: grid; grid-template-columns: 350px minmax(0, 1fr);
  grid-template-areas: "prev strip" "hint strip" "q q";
  gap: 10px 16px; align-items: start; padding: 14px 16px 12px;
  border-bottom: 1px solid #191c21; background: #08090c; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.bnr-prev { grid-area: prev; border-radius: 16px; overflow: hidden; }
.bnr-hint { grid-area: hint; }
.bnr-stripbox { grid-area: strip; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bnr-q { grid-area: q; }

/* podglad: klon karty, bez XP, liczb i przyciskow */
.bnr-prev .player-card { margin: 0; }
.bnr-prev .pc-actions, .bnr-prev .pc-stats, .bnr-prev .pc-xp-head, .bnr-prev .xp-bar-track,
.bnr-prev .pc-xp-foot, .bnr-prev .pc-cam-btn, .bnr-prev .pc-edit-btn { display: none !important; }
.bnr-prev .pc-body { padding-bottom: 14px; }
.bnr-prev, .bnr-prev * { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.bnr-prev .pc-avatar-img { cursor: default; }
.bnr-prev .pc-banner { cursor: grab; touch-action: none; outline: 0; }
.bnr-prev .pc-banner:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.bnr-prev .pc-banner.drag { cursor: grabbing; }
.bnr-prev .pc-bg-game { transition: none; }

.bnr-hint { display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--txt-dim); }
.bnr-hint i { color: var(--accent); }
.bnr-hint span { flex: 1; min-width: 0; }
.bnr-mini {
  font: inherit; font-size: var(--fs-tag); font-weight: 700; letter-spacing: 1px; padding: 6px 10px; border-radius: 7px;
  cursor: pointer; background: none; border: 1px solid #2a2d35; color: #c9d0d6; white-space: nowrap;
}
.bnr-mini:hover { border-color: var(--accent); color: var(--accent); }

.bnr-sub { font-size: var(--fs-tag); letter-spacing: 2px; font-weight: 700; color: var(--txt-dim); display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.bnr-sub em {
  font-style: normal; color: #fff; letter-spacing: 0.5px; font-weight: 600; font-size: var(--fs-small);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.bnr-none {
  font-size: var(--fs-small); color: var(--txt-dim); padding: 14px 10px; text-align: center; line-height: 1.5;
  border: 1px dashed #23262d; border-radius: 10px;
}
/* kadry wybranej gry: PC dwie kolumny z wlasnym przewijaniem, telefon pasek w bok */
.bnr-strip {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  max-height: 176px; overflow-y: auto; overflow-x: hidden; padding-right: 4px;
}

.bnr-q {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid #23262d; background: rgba(255, 255, 255, 0.03); transition: border-color 0.2s;
}
/* fokus: kreska od srodka pod polem — motion.css E3 (animacje etap 2, 18.10.2026; dawna ramka zdjeta) */
.bnr-q i { color: var(--accent); }
.bnr-q input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 16px; }
.bnr-q input::-webkit-search-cancel-button { display: none; }
.bnr-q input::placeholder { color: var(--txt-dim); }

/* --- DOL PRZEWIJANY: Twoje gry --- */
.bnr-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.bnr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bnr-strip, .bnr-list { scrollbar-width: thin; scrollbar-color: #2a2d35 transparent; }

/* kafel kadru (lista gier i kadry gry) */
.bnr-shot {
  position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; cursor: pointer; padding: 0;
  background: #111; border: 2px solid transparent; color: #fff; font: inherit; text-align: left;
  transition: border-color 0.2s, transform 0.2s;
}
.bnr-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bnr-shot:hover { transform: translateY(-2px); }
.bnr-shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bnr-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.8)); }
.bnr-shot b {
  position: absolute; left: 8px; right: 8px; bottom: 6px; z-index: 1; font-size: var(--fs-small); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bnr-shot .bnr-n {
  position: absolute; top: 6px; right: 6px; z-index: 1; font-style: normal; font-size: var(--fs-tag); font-weight: 700;
  padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.65); color: #c9d0d6;
}
.bnr-shot.sel { border-color: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
.bnr-shot .bnr-ok {
  position: absolute; top: 6px; left: 6px; z-index: 1; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #000; font-size: 11px;
}

/* --- STOPKA --- */
.bnr-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid #191c21; }
.bnr-clear { margin-right: auto; font: inherit; font-size: var(--fs-small); color: var(--txt-dim); background: none; border: 0; cursor: pointer; padding: 6px 0; }
.bnr-clear:hover { color: var(--danger); }
.bnr-btn {
  font: inherit; font-size: var(--fs-tag); font-weight: 700; letter-spacing: 1px; padding: 10px 16px; border-radius: 9px; cursor: pointer;
  border: 1px solid #2a2d35; background: none; color: #c9d0d6;
}
.bnr-btn:hover { border-color: var(--accent); color: var(--accent); }
.bnr-btn.ok { border-color: var(--accent); color: #000; background: var(--accent); }
.bnr-btn.ok:hover { color: #000; filter: brightness(1.1); }
.bnr-btn:disabled { opacity: 0.5; cursor: wait; }

/* --- TELEFON: plywajaca karta od dolu (ksztalt z .sx-ovl), wszystko w jednej kolumnie --- */
@media (max-width: 768px) {
  .bnr-modal { height: calc(100vh - 20px); height: calc(100dvh - 20px); }
  .bnr-pin { grid-template-columns: minmax(0, 1fr); grid-template-areas: "prev" "hint" "strip" "q"; gap: 8px; padding: 12px 12px 10px; }
  .bnr-strip { display: flex; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 0 0 4px; }
  .bnr-strip .bnr-shot { flex: 0 0 104px; }
  .bnr-list { padding: 10px 12px 8px; }
  .bnr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bnr-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .bnr-shot:hover { transform: none; }
}
/* niski telefon (np. iPhone SE): podpowiedz w jednej linii bez opisu, zeby lista gier miala miejsce */
@media (max-width: 768px) and (max-height: 700px) {
  .bnr-hint span { display: none; }
  .bnr-hint { justify-content: flex-end; }
  .bnr-hint i { margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .bnr-shot, .bnr-shot:hover { transition: none; transform: none; }
}
