/* 16.11.2026 match grid - one row per match with every market (history page + league pages).
   Owner screenshot: time/status | teams + crests | score | 1 X 2 | 1X2 O/U BTTS | best tip | confidence. */
.mg { text-align: left; --mg-bg: rgba(15, 23, 42, .55); --mg-line: rgba(148, 163, 184, .12); --mg-dim: #94a3b8; --mg-teal: #2dd4bf;
      --mg-win: #22c55e; --mg-loss: #f43f5e; --mg-chip: rgba(30, 41, 59, .85); font-variant-numeric: tabular-nums; }
.mg-group { background: var(--mg-bg); border: 1px solid var(--mg-line); border-radius: 14px; margin: 0 0 14px; overflow: hidden; }
.mg-ghead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--mg-line); }
.mg-ghead img { width: 22px; height: 22px; object-fit: contain; }
.mg-ghead b { font-size: 14px; color: #e2e8f0; }
.mg-ghead small { color: var(--mg-dim); font-size: 12px; }
.mg-ghead .mg-count { margin-left: auto; min-width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--mg-line);
                      display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--mg-dim); }
.mg-cols, .mg-row { display: grid; grid-template-columns: 64px minmax(180px, 1.6fr) 34px repeat(3, 58px) 18px repeat(3, 66px) 18px 76px 54px;
                    align-items: center; column-gap: 6px; padding: 0 14px; }
.mg-cols { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mg-dim); padding-top: 8px; padding-bottom: 8px; }
.mg-cols span { text-align: center; } .mg-cols span:nth-child(2) { text-align: left; }
.mg-row { min-height: 62px; border-top: 1px solid var(--mg-line); color: #e2e8f0; text-decoration: none; position: relative; }
.mg-row::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.mg-row.is-win::before { background: var(--mg-win); } .mg-row.is-loss::before { background: var(--mg-loss); }
.mg-row:hover { background: rgba(45, 212, 191, .05); }
.mg-st { font-size: 12.5px; color: var(--mg-dim); text-align: center; }
.mg-st.live { color: var(--mg-loss); font-weight: 700; }
.mg-teams { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mg-team { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-team img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.mg-team.dim { color: var(--mg-dim); font-weight: 500; }
.mg-score { display: flex; flex-direction: column; gap: 6px; font-weight: 700; text-align: center; font-size: 14px; }
.mg-odd { justify-self: center; min-width: 50px; padding: 5px 4px; border-radius: 8px; background: var(--mg-chip); border: 1px solid var(--mg-line);
          font-size: 12.5px; text-align: center; color: #cbd5e1; }
.mg-odd.fav { border-color: rgba(45, 212, 191, .55); color: #fff; }
.mg-pick { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 58px; }
.mg-pick b { font-size: 13px; color: var(--mg-teal); }
.mg-pick.win b { color: var(--mg-win); } .mg-pick.loss b { color: var(--mg-loss); }
.mg-pick i { font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--mg-chip); border: 1px solid var(--mg-line); color: #cbd5e1; }
.mg-pick.win i { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .35); }
.mg-pick.loss i { background: rgba(244, 63, 94, .12); border-color: rgba(244, 63, 94, .3); }
.mg-pick.none b { color: #475569; }
.mg-best { min-width: 70px; } .mg-best b { font-size: 14px; }
.mg-conf { text-align: center; font-weight: 700; font-size: 14px; }
.mg-conf.c-hi { color: var(--mg-win); } .mg-conf.c-mid { color: #facc15; } .mg-conf.c-lo { color: #fb923c; }
.mg-lock { grid-column: 8 / span 7; text-align: center; font-size: 12.5px; color: var(--mg-dim); }
.mg-lock a { color: var(--mg-teal); font-weight: 600; text-decoration: none; }
.mg-gap { display: block; }
.mg-day { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mg-dim); margin: 18px 4px 8px; font-weight: 700; }
.mg-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; align-items: center; }
.mg-tabs select { width: auto !important; max-width: 220px; font-family: inherit; }
.mg-tabs button, .mg-tabs select { background: var(--mg-chip, rgba(30,41,59,.85)); color: #e2e8f0; border: 1px solid rgba(148,163,184,.18);
                                   border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.mg-tabs button.on { background: #2dd4bf; color: #0f172a; border-color: #2dd4bf; font-weight: 700; }
.mg-pager { display: flex; justify-content: center; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.mg-pager button { min-width: 36px; height: 36px; border-radius: 9px; border: 1px solid rgba(148,163,184,.18); background: rgba(30,41,59,.85);
                   color: #e2e8f0; cursor: pointer; }
.mg-pager button.on { background: #2dd4bf; color: #0f172a; font-weight: 700; }
.mg-empty { padding: 26px; text-align: center; color: #94a3b8; }
/* phones (90 % of users): time | teams | score | best tip | confidence, markets on a second line */
@media (max-width: 900px) {
  .mg-cols { display: none; }
  .mg-row { grid-template-columns: 40px minmax(0, 1fr) 18px 56px 36px; column-gap: 5px; row-gap: 8px; padding: 10px 8px 10px 10px; }
  .mg-st { font-size: 10.5px; }
  .mg-team { font-size: 13px; gap: 6px; white-space: normal; line-height: 1.15; }
  .mg-team img { width: 16px; height: 16px; }
  .mg-score { font-size: 13px; }
  .mg-pick { min-width: 0; } .mg-pick i { padding: 2px 5px; font-size: 11px; }
  .mg-conf { font-size: 13px; }
  .mg-ghead { padding: 10px 12px; } .mg-ghead b { font-size: 13px; }
  .mg-row > .mg-odd, .mg-row > .mg-gap { display: none; }
  .mg-row > .mg-pick:not(.mg-best) { display: none; }
  .mg-markets { display: flex !important; grid-column: 2 / -1; gap: 6px; flex-wrap: wrap; }
  .mg-lock { grid-column: 4 / span 2; font-size: 11.5px; }
}
.mg-markets { display: none; }
.mg-markets span { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: rgba(30,41,59,.85); border: 1px solid rgba(148,163,184,.12); color: #cbd5e1; }
.mg-markets span.win { color: #86efac; border-color: rgba(34,197,94,.35); } .mg-markets span.loss { color: #fda4af; border-color: rgba(244,63,94,.3); }
.mg-markets em { font-style: normal; color: #94a3b8; margin-right: 4px; }

/* 17.11.2026: 901-1100 px (phone in landscape, small laptop) - the full table stays (owner: the chip layout "wygląda jak
   klocek"), only narrower: the fixed columns used to overflow the card and cut the confidence column off */
@media (min-width: 901px) and (max-width: 1100px) {
  .mg-cols, .mg-row { grid-template-columns: 52px minmax(130px, 1.4fr) 26px repeat(3, 48px) 6px repeat(3, 56px) 6px 62px 44px; column-gap: 4px; }
  .mg-odd { min-width: 42px; font-size: 12.5px; }
  .mg-pick { min-width: 48px; } .mg-pick i { font-size: 11px; padding: 2px 5px; }
  .mg-best { min-width: 56px; }
  .mg-conf { font-size: 13px; }
  .mg-cols span { font-size: 10px; }
}
