/* Match-by-match squad history, sharing the approved emerald pitch layout. */
.cb-history-workspace { --history-line: rgba(143, 225, 202, .17); }
.cb-history-badge { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 8px; border: 1px solid #658f853d; color: #b8cfc9; background: #6b928c0a; font-size: 12px; font-weight: 700; line-height: 1.5; }
.cb-history-badge.is-locked, .cb-history-badge.is-upcoming { color: #8af6c8; background: #3dc99c12; border-color: #68e4b343; }
.cb-history-badge.is-cancelled { color: #ffb8ac; background: #f1978010; border-color: #f1978038; }
.cb-history-armband { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #79f4bd; box-shadow: 0 0 18px #65eeb922; color: #09241a; font-size: 11px; font-weight: 800; }
.cb-history-armband.is-vice { background: #f1ce8b; box-shadow: 0 0 18px #f1ce8b18; }
.cb-history-empty { border: 1px dashed #73c4ac40; border-radius: 20px; text-align: center; padding: 45px 24px; background: radial-gradient(ellipse at 50% 0, #1c4d382f, transparent 70%); }
.cb-history-empty h2 { font-size: 25px; letter-spacing: -.03em; }
.cb-history-empty p { color: #abc5bc; line-height: 1.7; max-width: 570px; margin: 12px auto 24px; }
.cb-history-pitch { margin: 0; }
.cb-history-pitch .cb-squad-pitch-avatar { margin-bottom: 17px; }
.cb-history-player-points { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 91px; padding: 4px 3px; border: 1px solid #a7f3ce66; border-radius: 6px; background: linear-gradient(115deg, #154b38, #0b3027); box-shadow: 0 3px 8px #0004; color: #d5ffe9; font-size: 10px; font-weight: 700; white-space: nowrap; line-height: 1.4; }
.cb-history-player-points.is-scored { color: #b8ffdb; font-variant-numeric: tabular-nums; }
.cb-history-player-points.is-pending { background: #20342f; border-color: #8fa99e66; color: #c4d5ce; }
.cb-history-player-points.is-negative { background: linear-gradient(115deg, #563329, #342221); border-color: #e9a49288; color: #ffd2c3; }
.cb-history-points-note p + p { margin-top: 12px; }
.cb-history-leader { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--history-line); }
.cb-history-leader small { display: block; color: #a5c5b8; font-size: 12px; margin-bottom: 4px; }
.cb-history-leader strong { display: block; color: #e8fcf2; font-size: 15px; overflow-wrap: anywhere; }
.cb-history-points-note { margin: 22px 0; padding: 16px; border: 1px solid #8be5bd29; border-radius: 12px; background: #23483730; }
.cb-history-points-note h3 { color: #b8f1d3; font-size: 14px; margin: 0 0 8px; }
.cb-history-points-note p { margin: 0; color: #a9c9ba; line-height: 1.7; font-size: 13px; }
/* Slim navigation; match points belong to the historical pitch. */
.cb-history-match-bar { display: grid; grid-template-columns: 116px minmax(0, 1fr) 116px; align-items: center; gap: 24px; margin: 22px 0; padding: 4px 0; }
.cb-history-match-heading { min-width: 0; text-align: center; }
.cb-history-match-heading > .cb-eyebrow { display: block; margin: 0 0 8px; color: #93d9b5; font-size: 10px; text-align: center; }
.cb-history-match-heading h2 { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; color: #edfff6; font-size: clamp(17px, 1.6vw, 23px); line-height: 1.35; letter-spacing: -.025em; }
.cb-history-team { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.cb-history-team > span:not(.cb-squad-team-logo) { overflow-wrap: anywhere; min-width: 0; }
.cb-history-team .cb-squad-team-logo { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: #16382b; border: 1px solid #8ee8bd40; color: #b6f4cf; font-size: 10px; }
.cb-history-team .cb-squad-team-logo img { width: 28px; height: 28px; object-fit: contain; }
.cb-history-versus { color: #94b9a5; font-size: 11px; font-weight: 500; }
.cb-history-workspace .cb-history-page-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; border: 1px solid #88e2b551; border-radius: 10px; color: #ccffe4; background: linear-gradient(135deg, #285c42, #163b2f); box-shadow: inset 0 1px #caffdf18; font-size: 12px; font-weight: 650; line-height: 1.5; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s; }
.cb-history-workspace .cb-history-page-button > span[aria-hidden] { font-size: 18px; font-weight: 400; line-height: 1; }
.cb-history-workspace a.cb-history-page-button:hover { color: #effff6; border-color: #98efbf8c; background: #2c684b; }
.cb-history-workspace .cb-history-page-button[aria-disabled] { color: #839e91; border-color: #759d8524; background: #10281f; box-shadow: none; cursor: default; }
.cb-history-pitch .cb-history-match-total { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: fit-content; max-width: 100%; margin: -12px 0 8px auto; padding: 9px 13px; border: 1px solid #b3ebc43d; border-radius: 10px; background: #06281fda; box-shadow: inset 0 1px #d6ffe514; }
.cb-history-match-total span { display: block; color: #d4ebde; font-size: 11px; font-weight: 600; }
.cb-history-match-total strong { color: #a8ffd6; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cb-history-match-total strong.is-negative { color: #ffb8a4; }
.cb-history-match-total small { display: block; margin-top: 3px; color: #a8c6b6; font-size: 10px; }
.cb-history-match-details { margin: 16px 0; border-top: 1px solid #92cca72b; }
.cb-history-match-details summary { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 44px; color: #b6d3c2; font-size: 12px; cursor: pointer; list-style: none; }
.cb-history-match-details summary::-webkit-details-marker { display: none; }
.cb-history-match-details summary > span { color: #82e8b8; font-size: 18px; transition: transform .15s; }
.cb-history-match-details[open] summary > span { transform: rotate(45deg); }
.cb-history-match-details summary:focus-visible { outline: 2px solid #8afad0; outline-offset: 2px; border-radius: 4px; }
.cb-history-match-details-body { display: grid; gap: 12px; padding: 4px 0 14px; color: #abc7ba; font-size: 12px; line-height: 1.75; }
.cb-history-match-details-body p { margin: 0; }
.cb-history-match-details-body p + p { margin-top: 6px; }
@media (max-width: 700px) {
  .cb-history-match-bar { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 12px; margin: 18px 0; }
  .cb-history-workspace .cb-history-page-button { width: 44px; padding: 0; }
  .cb-history-page-button .cb-history-button-label { display: none; }
  .cb-history-match-heading h2 { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 7px; font-size: 15px; }
  .cb-history-team { flex-direction: column; gap: 6px; }
  .cb-history-team:last-child .cb-squad-team-logo { order: -1; }
  .cb-history-team .cb-squad-team-logo { flex-basis: 30px; width: 30px; height: 30px; border-radius: 8px; }
  .cb-history-team .cb-squad-team-logo img { width: 24px; height: 24px; }
}
@media (max-width: 480px) {
  .cb-history-match-bar { gap: 8px; }
  .cb-history-match-heading h2 { font-size: 13px; }
  .cb-history-pitch .cb-history-match-total { margin-top: -10px; margin-right: 4px; padding: 8px 11px; }
  .cb-history-match-total strong { font-size: 24px; }
  .cb-history-player-points { width: 80px; font-size:10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cb-history-match-details summary > span, .cb-history-workspace .cb-history-page-button { transition: none; }
}
.cb-history-workspace a:focus-visible { outline: 2px solid #8afad0; outline-offset: 4px; }
