/* MB_VOTI_V1: every rule is local to the new section; existing popup dimensions unchanged. */
.mb-premium-overlay .mb-voti-v1 { margin:18px 0 0; padding:0; min-width:0; max-width:100%; color:#cbd5e1; }
/* Title typography, spacing and round badge are inherited from the native popup. */
.mb-premium-overlay .mb-voti-v1-scroll { width:100%; max-width:100%; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; }
.mb-premium-overlay .mb-voti-v1-table { width:100%; min-width:0; margin:0; border:0; border-spacing:0 5px; border-collapse:separate; table-layout:fixed; font:600 12px/1.35 'Segoe UI',Arial,sans-serif; color:#cbd5e1; }
.mb-premium-overlay .mb-voti-v1-table th, .mb-premium-overlay .mb-voti-v1-table td { border:0; margin:0; padding:7px 3px; vertical-align:middle; text-align:center; white-space:nowrap; background:none; color:inherit; font:inherit; }
.mb-premium-overlay .mb-voti-v1-table thead th { padding:3px 3px 5px; color:#94a3b8; font-weight:700; }
.mb-premium-overlay .mb-voti-v1-table thead th:first-child { text-align:center; }
.mb-premium-overlay .mb-voti-v1-table tbody th, .mb-premium-overlay .mb-voti-v1-table tbody td { background:rgba(255,255,255,.12); }
.mb-premium-overlay .mb-voti-v1-table tbody th:first-child { border-radius:8px 0 0 8px; width:auto; padding:4px 2px; }
.mb-premium-overlay .mb-voti-v1-table tbody td:last-child { border-radius:0 8px 8px 0; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-day > .mb-voti-v1-day-badge { display:inline-flex; min-width:27px; height:27px; padding:0 3px; box-sizing:border-box; align-items:center; justify-content:center; border-radius:5px; color:#fff; font-weight:800; }
.mb-premium-overlay .mb-voti-v1-start { background:#48ad28; }
.mb-premium-overlay .mb-voti-v1-sub { background:#c98a00; }
.mb-premium-overlay .mb-voti-v1-neutral { background:#566176; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-match { text-align:center; font-size:11px; margin:4px 0 0; line-height:1.35; }
.mb-premium-overlay .mb-voti-v1-match > span { display:inline; white-space:nowrap; }
.mb-premium-overlay .mb-voti-v1-match .mb-voti-v1-active { font-weight:900; color:#eef2ff; }
.mb-premium-overlay .mb-voti-v1-match .mb-voti-v1-score { padding:0 4px; color:#94a3b8; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-fv { color:#38bdf8; font-weight:800; }
.mb-premium-overlay .mb-voti-v1-in { color:#4ade80; font-weight:900; }
.mb-premium-overlay .mb-voti-v1-out { color:#f87171; font-weight:900; }
.mb-premium-overlay .mb-voti-v1-event { display:inline-flex; align-items:center; gap:2px; margin:0 2px; font-size:11px; }
.mb-premium-overlay .mb-voti-v1-event img { display:inline-block; width:19px; height:19px; max-width:none; margin:0; padding:0; border:0; object-fit:contain; vertical-align:middle; }
.mb-premium-overlay .mb-voti-v1-unknown { font-size:10px; }
.mb-premium-overlay .mb-voti-v1-note { margin:0 0 8px; padding:10px; border:1px solid rgba(255,255,255,.08); border-radius:8px; color:#cbd5e1; font:13px/1.4 'Segoe UI',Arial,sans-serif; }

/* PARTITE UI V2: grouping changes the view, never the source values. */
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-match { text-transform:uppercase; }
.mb-premium-overlay .mb-voti-v1-substitution .mb-voti-v1-minute { display:inline-flex; align-items:center; gap:2px; white-space:nowrap; vertical-align:middle; font-weight:800; }
.mb-premium-overlay .mb-voti-v1-arrow { display:inline-block; width:13px; height:16px; flex:0 0 13px; fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
.mb-premium-overlay .mb-voti-v1-separator { color:#94a3b8; font-weight:600; }

/* PARTITE UI V3: day number above match, four physical columns, no global popup changes. */
.mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-day { width:28%; }
.mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-vote { width:20%; }
.mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-substitution { width:26%; }
.mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-events { width:26%; }
.mb-premium-overlay .mb-voti-v1-table thead th { white-space:normal; overflow-wrap:normal; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-day { text-align:center; white-space:normal; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-match { white-space:normal; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-match > span { white-space:normal; overflow-wrap:anywhere; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-match .mb-voti-v1-score { white-space:nowrap; padding:0 3px; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-vote,
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-substitution,
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-events { white-space:normal; }
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-base-vote,
.mb-premium-overlay .mb-voti-v1-table .mb-voti-v1-fv { white-space:nowrap; }
.mb-premium-overlay .mb-voti-v1-events .mb-voti-v1-event { max-width:100%; box-sizing:border-box; margin:1px; white-space:normal; overflow-wrap:anywhere; }
.mb-premium-overlay .mb-voti-v1-events .mb-voti-v1-event img { flex-shrink:0; }
.mb-premium-overlay .mb-voti-v1-events .mb-voti-v1-unknown { min-width:0; overflow-wrap:anywhere; }
@media (max-width:350px) {
  .mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-day { width:31%; }
  .mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-vote { width:22%; }
  .mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-substitution { width:25%; }
  .mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-events { width:22%; }
}
@media (min-width:641px) {
  .mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-vote { width:20%; }
  .mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-day { width:26%; }
  .mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-substitution { width:27%; }
  .mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-events { width:27%; }
}

/* PARTITE UI V4: use nearly the whole modal width, but keep the other sections' padding. */
.mb-premium-overlay .mb-voti-v1-scroll {
  --mb-partite-bleed: 12px;
  width: calc(100% + var(--mb-partite-bleed) * 2);
  max-width: none;
  margin-left: calc(-1 * var(--mb-partite-bleed));
  margin-right: calc(-1 * var(--mb-partite-bleed));
  overflow: visible;
}
@media (max-width:640px) {
  .mb-premium-overlay .mb-voti-v1-scroll { --mb-partite-bleed: 8px; }
}
.mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-day { width:26%; }
.mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-vote { width:22%; }
.mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-substitution { width:31%; }
.mb-premium-overlay .mb-voti-v1-table .mb-partite-v3-col-events { width:21%; }
.mb-premium-overlay .mb-voti-v1-table thead th.mb-partite-v4-substitution-heading {
  white-space:nowrap; overflow-wrap:normal; word-break:normal; hyphens:none;
}

/* PARTITE UI V5: requested title case; the last heading always has two lines. */
.mb-premium-overlay .mb-voti-v1-table thead th {
  text-transform:none!important;
}
.mb-premium-overlay .mb-voti-v1-table thead th:first-child { padding-left:1px; padding-right:1px; }
.mb-premium-overlay .mb-partite-v5-sort {
  display:inline-flex; align-items:center; justify-content:center; gap:3px;
  padding:0; margin:0; border:0; background:transparent; box-shadow:none;
  color:inherit; font:inherit; letter-spacing:inherit; text-transform:none;
  white-space:nowrap; cursor:pointer; appearance:none;
}
.mb-premium-overlay .mb-partite-v5-sort:focus-visible { outline:2px solid #38bdf8; outline-offset:3px; border-radius:3px; }
.mb-premium-overlay .mb-partite-v5-sort-icon { width:10px; height:14px; flex:0 0 10px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.mb-premium-overlay .mb-partite-v5-sort[data-direction="descending"] .mb-partite-v5-sort-up,
.mb-premium-overlay .mb-partite-v5-sort[data-direction="ascending"] .mb-partite-v5-sort-down { opacity:.3; }

/* The original Bonus/Malus cards, in source order, share ONE row per section.
   Transparent grid wrappers do not create a second row for the Assist card.
   No icon, font, numeric value, border, background or Info rule is changed. */
.mb-premium-overlay .mb-premium-body > .mb-premium-section[data-mb-stats-row-v5="1"] {
  display:grid; grid-template-columns:repeat(var(--mb-stats-row-count),minmax(0,1fr));
  column-gap:6px; row-gap:0;
}
.mb-premium-overlay .mb-premium-section[data-mb-stats-row-v5="1"] > .mb-premium-section-title { grid-column:1 / -1; }
.mb-premium-overlay .mb-premium-section[data-mb-stats-row-v5="1"] > .mb-premium-grid { display:contents; }
.mb-premium-overlay .mb-premium-section[data-mb-stats-row-v5="1"] > .mb-premium-grid > .mb-premium-card {
  grid-column:auto; grid-row:2; min-width:0; box-sizing:border-box;
  padding-left:4px; padding-right:4px; flex-wrap:wrap; justify-content:center;
  column-gap:6px; row-gap:6px;
}
.mb-premium-overlay .mb-premium-section[data-mb-stats-row-v5="1"] .mb-premium-meta { flex:1 1 80px; text-align:center; }
@media (max-width:640px) {
  .mb-premium-overlay .mb-premium-body > .mb-premium-section[data-mb-stats-row-v5="1"] { column-gap:4px; }
  .mb-premium-overlay .mb-premium-section[data-mb-stats-row-v5="1"] > .mb-premium-grid > .mb-premium-card {
    padding-left:2px; padding-right:2px; flex-direction:column; flex-wrap:nowrap;
  }
  .mb-premium-overlay .mb-premium-section[data-mb-stats-row-v5="1"] .mb-premium-meta { flex:0 0 auto; width:100%; }
}

/* MB_STATS_UNIFORM_V6: ONLY Info/Bonus copy Malus dimensions. Malus is not restyled.
   Four equal slots preserve one row even when the section has only two/three cards.
   Inner vertical padding fits the existing fonts/icons in the reference height. */
.mb-premium-overlay .mb-premium-section[data-mb-stats-size-v6="1"] > .mb-premium-grid > .mb-premium-card {
  height:var(--mb-stats-card-height-v6);
  min-height:var(--mb-stats-card-height-v6);
  max-height:var(--mb-stats-card-height-v6);
  flex-direction:column; flex-wrap:nowrap;
  padding-top:3px; padding-bottom:3px;
}
.mb-premium-overlay .mb-premium-section[data-mb-stats-size-v6="1"] .mb-premium-meta {
  flex:0 0 auto; width:100%;
}
/* Existing penalty/set-piece tags keep their full-width line above the Info cards. */
.mb-premium-overlay .mb-premium-section[data-mb-stats-tags-v6="1"] > .mb-premium-special-tags {
  grid-column:1 / -1; grid-row:2;
}
.mb-premium-overlay .mb-premium-section[data-mb-stats-tags-v6="1"] > .mb-premium-grid > .mb-premium-card {
  grid-row:3;
}

/* MB_LABELS_V7: only the eight labels requested; no font-size/color/layout change. */
.mb-premium-overlay .mb-premium-body .mb-premium-card .mb-premium-label[data-mb-label-v7="1"] {
  text-shadow:0.2px 0 0 currentColor, -0.2px 0 0 currentColor;
}
