
/* V4.2 — clickable team history */
.team-history-modal{display:none;position:fixed;inset:0;z-index:10020}
.team-history-modal.open{display:block}
.team-history-backdrop{position:absolute;inset:0;background:rgba(9,6,11,.64);backdrop-filter:blur(3px)}
.team-history-sheet{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(720px,calc(100vw - 28px));max-height:calc(100vh - 34px);overflow:auto;
  border:1px solid #d7d2ca;border-radius:24px;background:#fbfaf7;padding:24px;
  box-shadow:0 28px 90px rgba(0,0,0,.30)
}
.team-history-close{position:absolute;right:16px;top:11px;border:0;background:transparent;color:#888;font-size:30px;cursor:pointer}
.th-kicker{font-size:9px;font-weight:700;letter-spacing:.11em;color:#a224ba}
.team-history-sheet h2{font-size:34px;margin:4px 0 17px}
.th-player-grid,.th-stat-grid{display:grid;gap:9px}
.th-player-grid{grid-template-columns:1fr 1fr;margin-bottom:9px}
.th-stat-grid{grid-template-columns:repeat(4,1fr)}
.th-player-grid>div,.th-stat-grid>div{
  border:1px solid #dfdcd5;background:#f4f2ed;border-radius:14px;padding:12px
}
.th-player-grid span,.th-stat-grid span{display:block;font-size:9px;color:#888;text-transform:uppercase;letter-spacing:.05em}
.th-player-grid b{display:block;font-size:29px;margin-top:4px}
.th-stat-grid b{display:block;font-size:22px;margin-top:4px}
.th-player-grid small,.th-stat-grid small{font-size:8px;color:#aaa}
.th-best{
  margin-top:11px;border-radius:15px;padding:13px 14px;background:linear-gradient(135deg,#1d0828,#351046);color:#fff
}
.th-best span{display:block;font-size:8px;font-weight:700;letter-spacing:.10em;color:#d592e6}
.th-best b{display:block;font-size:18px;margin-top:4px}
.th-best small{display:block;margin-top:3px;color:#cfc3d4;font-size:9px}
.th-best.empty{background:#f0eee8;color:#777}.th-best.empty span{color:#999}
.th-recent-head{display:flex;justify-content:space-between;align-items:baseline;margin-top:18px;margin-bottom:5px}
.th-recent-head span{font-size:9px;font-weight:700;letter-spacing:.10em;color:#a224ba}
.th-recent-head b{font-size:11px}
.th-match-row{
  display:grid;grid-template-columns:31px minmax(0,1fr) 58px;gap:9px;align-items:center;
  padding:11px 0;border-bottom:1px solid #e6e2db
}
.th-match-row:last-child{border-bottom:0}
.th-match-row small{display:block;font-size:8px;color:#999}
.th-match-row b{display:block;margin-top:2px;font-size:12px}
.th-result{width:27px;height:27px;border-radius:8px;display:grid;place-items:center;font-size:9px;font-weight:700}
.th-result.w{background:#e6f2eb;color:#267052}.th-result.d{background:#efede8;color:#777}.th-result.l{background:#f4e6e5;color:#a34d48}
.th-controller{text-align:right;font-size:10px;font-weight:700;color:#777}
.th-empty{padding:16px 0;color:#999;font-size:11px}
@media(max-width:700px){
  .team-history-sheet{padding:19px 13px;border-radius:18px}
  .team-history-sheet h2{font-size:28px}
  .th-stat-grid{grid-template-columns:1fr 1fr}
}

/* 08.11.2026: the dark site theme painted the numbers in the light cards white, so they were invisible */
.team-history-sheet .th-player-grid>div b,.team-history-sheet .th-stat-grid>div b{color:#14171a!important}
.team-history-sheet .th-player-grid>div span,.team-history-sheet .th-stat-grid>div span{color:#6f6a63!important}
.team-history-sheet .th-player-grid>div small,.team-history-sheet .th-stat-grid>div small{color:#8a857e!important}
.team-history-sheet .th-best.empty b{color:#3a3530!important}

/* 08.11.2026: СЛЕДУЮЩИЕ МАТЧИ in the team window */
.th-result.home{background:#e3edf6;color:#005381}.th-result.away{background:#f6ece0;color:#9a5a00}
.th-next-row b .th-vs{display:inline-block;min-width:16px;color:#8a857e;font-size:10px;font-weight:700}
.th-next-row b .th-pos{font-style:normal;font-size:10px;font-weight:600;color:#8a857e;margin-left:4px}
.th-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.th-tag{font-style:normal;font-size:8px;font-weight:700;letter-spacing:.04em;padding:2px 6px;border-radius:6px;text-transform:uppercase}
.th-tag.gotn{background:#1d0828;color:#f1c75b}
.th-tag.ban{background:#f4e6e5;color:#a3001e}

/* ===== 08.11.2026 v5: light, readable team window in the site's style (white cards, Oswald, site blue / green / red).
   Beats v15_unified_dark_v1516.css (dark sheet on home/legacy pages) by id + !important. ===== */
html body #teamHistoryModal .team-history-backdrop{background:rgba(2,12,17,.55)!important}
html body #teamHistoryModal .team-history-sheet{width:min(760px,calc(100vw - 28px))!important;background:#eef2f5!important;color:#020c11!important;border:0!important;border-radius:18px!important;padding:26px 26px 22px!important;box-shadow:0 24px 80px rgba(2,12,17,.35)!important;font-family:'Oswald',Arial,sans-serif!important}
html body #teamHistoryModal .team-history-close{color:#52697b!important;font-size:34px!important;right:14px!important;top:8px!important}
html body #teamHistoryModal .th-kicker{color:#005381!important;font:700 12px/1 'Oswald',Arial!important;letter-spacing:.12em!important}
html body #teamHistoryModal .th-team-title{display:flex;align-items:center;gap:14px;margin:8px 0 18px!important}
html body #teamHistoryModal .th-title-crest{width:56px;height:56px;object-fit:contain;flex:0 0 56px}
html body #teamHistoryModal .team-history-sheet h2{margin:0!important;color:#020c11!important;font:700 34px/1.05 'Oswald',Arial!important;text-transform:uppercase;letter-spacing:.01em}
/* stat cards */
html body #teamHistoryModal .th-player-grid,html body #teamHistoryModal .th-stat-grid{gap:10px!important}
html body #teamHistoryModal .th-player-grid>div,html body #teamHistoryModal .th-stat-grid>div{background:#fff!important;border:0!important;border-radius:12px!important;padding:14px 16px!important;box-shadow:0 1px 4px rgba(10,26,35,.08)!important}
html body #teamHistoryModal .th-player-grid span,html body #teamHistoryModal .th-stat-grid span{color:#678093!important;font:600 12px 'Oswald',Arial!important;letter-spacing:.04em!important}
html body #teamHistoryModal .th-player-grid b{color:#005381!important;font:900 38px/1 'Oswald',Arial!important;margin-top:6px!important}
html body #teamHistoryModal .th-player-grid>div.alex b{color:#1c9a56!important}
html body #teamHistoryModal .th-player-grid>div.zheka b{color:#a3001e!important}
html body #teamHistoryModal .th-stat-grid b{color:#020c11!important;font:800 28px/1 'Oswald',Arial!important;margin-top:6px!important;font-variant-numeric:tabular-nums}
html body #teamHistoryModal .th-player-grid small,html body #teamHistoryModal .th-stat-grid small{display:block;margin-top:4px;color:#8aa0b0!important;font:600 11px 'Oswald',Arial!important}
/* best result */
html body #teamHistoryModal .th-best{margin-top:10px!important;background:#fff!important;color:#020c11!important;border-radius:12px!important;padding:14px 16px!important;box-shadow:0 1px 4px rgba(10,26,35,.08);border-left:5px solid #1c9a56}
html body #teamHistoryModal .th-best.empty{border-left-color:#c9d3db}
html body #teamHistoryModal .th-best span{color:#678093!important;font:600 12px 'Oswald',Arial!important;letter-spacing:.04em}
html body #teamHistoryModal .th-best b{color:#020c11!important;font:700 20px/1.3 'Oswald',Arial!important;margin-top:6px!important;display:flex!important;align-items:center;flex-wrap:wrap;gap:6px}
html body #teamHistoryModal .th-best small{color:#678093!important;font:600 12px 'Oswald',Arial!important;margin-top:4px!important}
/* section heads */
html body #teamHistoryModal .th-recent-head{margin:22px 0 8px!important;padding:0 2px}
html body #teamHistoryModal .th-recent-head span{color:#020c11!important;font:700 15px 'Oswald',Arial!important;letter-spacing:.06em!important}
html body #teamHistoryModal .th-recent-head b{color:#678093!important;font:600 12px 'Oswald',Arial!important}
/* match rows as white cards */
html body #teamHistoryModal .th-recent{display:grid;gap:8px}
html body #teamHistoryModal .th-match-row{grid-template-columns:38px minmax(0,1fr) auto!important;gap:12px!important;padding:12px 14px!important;background:#fff!important;border:0!important;border-radius:12px!important;box-shadow:0 1px 4px rgba(10,26,35,.08)}
html body #teamHistoryModal .th-match-row small{color:#678093!important;font:600 12px 'Oswald',Arial!important;letter-spacing:.02em}
html body #teamHistoryModal .th-match-row b{color:#020c11!important;font:600 17px/1.3 'Oswald',Arial!important;margin-top:4px!important;display:flex!important;align-items:center;flex-wrap:wrap;gap:6px}
html body #teamHistoryModal .th-result{width:38px!important;height:38px!important;border-radius:10px!important;font:800 15px 'Oswald',Arial!important}
html body #teamHistoryModal .th-result.w{background:#e3f4ea!important;color:#1c9a56!important}
html body #teamHistoryModal .th-result.l{background:#f8e5e8!important;color:#a3001e!important}
html body #teamHistoryModal .th-result.d{background:#f7eedf!important;color:#ba7000!important}
html body #teamHistoryModal .th-result.home{background:#005381!important;color:#fff!important}
html body #teamHistoryModal .th-result.away{background:#e3edf6!important;color:#005381!important}
html body #teamHistoryModal .th-controller{font:700 13px 'Oswald',Arial!important;color:#52697b!important;text-transform:uppercase;letter-spacing:.03em}
html body #teamHistoryModal .th-controller.alex{color:#1c9a56!important}
html body #teamHistoryModal .th-controller.zheka{color:#a3001e!important}
html body #teamHistoryModal .th-club{display:inline-flex;align-items:center;gap:7px;min-width:0}
html body #teamHistoryModal .th-crest{width:24px;height:24px;object-fit:contain;flex:0 0 24px}
html body #teamHistoryModal .th-club-name{color:#020c11}
html body #teamHistoryModal .th-next-row b .th-vs{color:#678093!important;font:700 13px 'Oswald',Arial!important;min-width:18px}
html body #teamHistoryModal .th-next-row b .th-pos{color:#005381!important;background:#e3edf6;border-radius:6px;padding:2px 7px;font:700 12px 'Oswald',Arial!important;font-style:normal;margin-left:2px}
html body #teamHistoryModal .th-tags{margin-top:6px!important;gap:6px!important}
html body #teamHistoryModal .th-tag{font:700 11px/1 'Oswald',Arial!important;padding:5px 8px!important;border-radius:6px!important;letter-spacing:.04em}
html body #teamHistoryModal .th-tag.gotn{background:#ba7000!important;color:#fff!important}
html body #teamHistoryModal .th-tag.ban{background:#a3001e!important;color:#fff!important}
html body #teamHistoryModal .th-empty{color:#678093!important;font:600 14px 'Oswald',Arial!important;background:#fff;border-radius:12px;padding:14px 16px!important}
/* phone: full-height bottom sheet, same readable sizes */
@media (max-width:700px){
  html body #teamHistoryModal .team-history-sheet{left:0!important;right:0!important;top:auto!important;bottom:0!important;transform:none!important;width:100%!important;max-width:100%!important;max-height:92dvh!important;border-radius:18px 18px 0 0!important;padding:20px 14px calc(18px + env(safe-area-inset-bottom))!important}
  html body #teamHistoryModal .team-history-sheet h2{font-size:28px!important}
  html body #teamHistoryModal .th-title-crest{width:44px;height:44px;flex-basis:44px}
  html body #teamHistoryModal .th-stat-grid{grid-template-columns:1fr 1fr!important}
  html body #teamHistoryModal .th-player-grid b{font-size:32px!important}
  html body #teamHistoryModal .th-stat-grid b{font-size:24px!important}
  html body #teamHistoryModal .th-match-row{grid-template-columns:34px minmax(0,1fr)!important;gap:10px!important;padding:11px 12px!important}
  html body #teamHistoryModal .th-match-row .th-controller{grid-column:2;justify-self:start;font-size:12px!important;margin-top:-2px}
  html body #teamHistoryModal .th-result{width:34px!important;height:34px!important}
  html body #teamHistoryModal .th-match-row b{font-size:16px!important}
}
