/* FM27 R27.26.13.1 — compact FM26-inspired header with original FM27 dark/violet palette. */
body.fm27-midnight .fm27-navigation{
  background:linear-gradient(100deg,#131629 0%,#17182d 56%,#19182e 100%);
  border-bottom:1px solid #30334d;
  box-shadow:0 3px 16px rgba(5,5,14,.28);
}
body.fm27-midnight .fm27-navigation-main{
  display:flex; align-items:center; gap:9px; min-height:62px;
  padding:0 clamp(12px,1.6vw,27px);
}
body.fm27-midnight .fm27-club-brand{margin-right:7px;flex-shrink:0}
body.fm27-midnight .fm27-club-crest{
  display:grid;place-items:center;width:48px;height:48px;overflow:hidden;
  border-radius:50%;border:2px solid rgba(221,209,251,.78);
  background:radial-gradient(circle at 34% 27%,#6d4dae 0%,#30234f 72%);
  box-shadow:0 0 0 3px rgba(10,8,31,.26);color:#f0e9ff;
}
body.fm27-midnight .fm27-club-crest img{width:100%;height:100%;object-fit:contain;padding:3px}
body.fm27-midnight .fm27-club-crest .bi{font-size:25px}
body.fm27-midnight .fm27-primary-links{
  height:62px;align-items:stretch;gap:0;margin:0;min-width:0;
}
body.fm27-midnight .fm27-primary-link{
  gap:6px;padding:0 clamp(9px,.83vw,15px);
  color:#c5c7de;font-size:12.5px;font-weight:760;letter-spacing:.012em;
  border-bottom:3px solid transparent;text-shadow:0 1px 1px #0d0c1d;
}
body.fm27-midnight .fm27-primary-link .bi{font-size:14px;font-weight:400}
body.fm27-midnight .fm27-primary-link:hover,
body.fm27-midnight .fm27-primary-link:focus-visible{background:rgba(179,139,252,.13);color:#fff}
body.fm27-midnight .fm27-primary-link.is-active{
  color:#fff;background:linear-gradient(0deg,rgba(164,114,252,.18),rgba(255,255,255,.04));
  border-bottom-color:#a472fc;
}
body.fm27-midnight .fm27-nav-actions{
  margin-left:auto;display:flex;align-items:center;gap:6px;min-width:0;
}
body.fm27-midnight .fm27-nav-action{
  display:grid;place-items:center;flex:0 0 35px;width:35px;min-width:35px;height:35px;min-height:35px;
  padding:0;border:1px solid rgba(164,164,204,.26);border-radius:6px;
  background:rgba(36,39,66,.80);color:#eee7ff;box-shadow:none;
}
body.fm27-midnight .fm27-nav-action .bi{font-size:18px}
body.fm27-midnight .fm27-nav-action:hover,
body.fm27-midnight .fm27-nav-action:focus-visible{background:rgba(164,114,252,.20);color:#fff;border-color:#a98aee}
body.fm27-midnight .fm27-header-fixture{
  display:flex;flex-direction:column;justify-content:center;gap:1px;min-width:181px;max-width:216px;
  height:46px;margin-left:6px;padding:4px 10px 4px 11px;
  border:1px solid rgba(151,141,188,.42);border-radius:5px;
  color:#ece8fa;text-decoration:none;background:rgba(30,31,53,.78);
  white-space:nowrap;transition:background .15s,border-color .15s;
}
body.fm27-midnight .fm27-header-fixture:hover,
body.fm27-midnight .fm27-header-fixture:focus-visible{background:rgba(54,42,81,.92);border-color:#f4eaff;color:#fff}
body.fm27-midnight .fm27-header-datetime{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:11px;font-weight:800;line-height:1.2}
body.fm27-midnight .fm27-header-date{letter-spacing:.015em}
body.fm27-midnight .fm27-header-time{background:rgba(233,224,250,.92);color:#241a3d;padding:2px 4px;border-radius:2px;font-size:10px;letter-spacing:.025em}
body.fm27-midnight .fm27-header-next{display:flex;align-items:center;gap:5px;min-width:0;color:#c8c6df;font-size:10.7px;line-height:1.4}
body.fm27-midnight .fm27-header-next>.bi{font-size:11px;flex:none}
body.fm27-midnight .fm27-header-next-text{min-width:0;display:block;overflow:hidden;text-overflow:ellipsis}
body.fm27-midnight .fm27-header-next-text strong{font-weight:800;color:#fff}
body.fm27-midnight .fm27-context-nav{
  background:linear-gradient(100deg,#1b1f34 0%,#1e2138 85%);
  border-top:1px solid rgba(189,170,229,.18);border-bottom:1px solid rgba(146,128,185,.27)
}
body.fm27-midnight .fm27-context-inner{
  display:flex;align-items:stretch;gap:0;min-height:36px;
  padding:0 clamp(12px,1.6vw,27px);overflow-x:auto;scrollbar-width:thin;
}
body.fm27-midnight .fm27-context-link{
  display:inline-flex;align-items:center;align-self:stretch;
  padding:7px 13px;color:#bec1d8;font-size:11.5px;font-weight:650;
  line-height:1.55;border-bottom:2px solid transparent;
}
body.fm27-midnight .fm27-context-link:hover{background:rgba(164,114,252,.13);color:#fff}
body.fm27-midnight .fm27-context-link.is-active{background:rgba(164,114,252,.16);color:#fff;border-bottom-color:#a472fc;font-weight:820}
/* Offcanvas: preserve all original account actions, update only visual hierarchy. */
body.fm27-midnight .fm27-drawer{
  --bs-offcanvas-bg:#171a2e;--bs-offcanvas-color:#eeeafa;
  --bs-offcanvas-width:min(385px,100vw);
  border-left:1px solid #45405d;
  box-shadow:-18px 0 45px rgba(4,4,15,.36)
}
body.fm27-midnight .fm27-drawer .offcanvas-header{padding:19px 20px;background:linear-gradient(115deg,#2a2244,#1a1930);border-bottom:1px solid #484060}
body.fm27-midnight .fm27-drawer .offcanvas-title{display:flex;align-items:center;gap:10px;color:#fff;font-size:16px;font-weight:800}
body.fm27-midnight .fm27-drawer .offcanvas-body{padding:20px}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-usercard{
  padding:18px;background:linear-gradient(160deg,#27233e,#1d2036);border:1px solid #44405e;
  border-radius:10px;box-shadow:0 7px 22px rgba(4,4,14,.25)
}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-usercard-header{display:flex;align-items:center;gap:12px;min-width:0}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-usercard-identity{min-width:0}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-avatar{flex:none}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-user-name{font-size:17px;font-weight:840;color:#fff;text-decoration:none}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-team{font-size:12px;color:#c7b6ee;text-decoration:none}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-usercard-details{display:flex;flex-direction:column;gap:9px;margin-top:16px}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-account-row,
body.fm27-midnight .fm27-account-drawer .ws-sidebar-profile-link{
  display:flex;align-items:center;gap:12px;padding:12px;
  border:1px solid rgba(179,151,222,.20);border-radius:7px;
  background:rgba(25,24,45,.52);color:#eeebf9;text-decoration:none;
}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-account-row .bi,
body.fm27-midnight .fm27-account-drawer .ws-sidebar-profile-link .bi{font-size:18px;color:#bc9af8}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-account-row>span{display:flex;flex-direction:column;min-width:0}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-account-row small{font-size:11px;color:#c2bed7}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-account-row strong{font-size:14px;overflow-wrap:anywhere}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-inbox{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-inbox-link{
  display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;padding:11px 6px;
  background:rgba(25,23,44,.58);border:1px solid rgba(180,150,230,.23);border-radius:7px;
  color:#e9e1f9;text-decoration:none;font-size:12px;
}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-inbox-link .bi{color:#b79af0;font-size:16px}
body.fm27-midnight .fm27-account-drawer .ws-sidebar-account-row:hover,
body.fm27-midnight .fm27-account-drawer .ws-sidebar-inbox-link:hover,
body.fm27-midnight .fm27-account-drawer .ws-sidebar-profile-link:hover{border-color:#a472fc;background:rgba(113,73,170,.32);color:#fff}
body.fm27-midnight .fm27-account-drawer .fm27-language-row{background:rgba(30,27,55,.76);border:1px solid #484064;border-radius:8px;padding:12px}
body.fm27-midnight .fm27-account-drawer .fm27-logout{display:flex;align-items:center;gap:10px;padding:12px;background:#2c2942;border:1px solid #4a4564;border-radius:7px;color:#f4efff;font-size:13px}
body.fm27-midnight .fm27-account-drawer .fm27-logout:hover{background:#41335d}
body.fm27-midnight .fm27-mobile-group{border-bottom-color:#443d5f}
body.fm27-midnight .fm27-mobile-heading{color:#eae5f8}
body.fm27-midnight .fm27-mobile-heading.is-active{color:#fff}
body.fm27-midnight .fm27-mobile-items a{background:#24233e;color:#d9d2eb}
body.fm27-midnight .fm27-mobile-items a.is-active{background:#543675;color:#fff}
@media (max-width:1199.98px){
  body.fm27-midnight .fm27-navigation-main{min-height:60px}
  body.fm27-midnight .fm27-header-fixture{min-width:180px}
}
@media (max-width:560px){
  body.fm27-midnight .fm27-navigation-main{padding:0 10px;gap:5px}
  body.fm27-midnight .fm27-club-brand{margin-right:0}
  body.fm27-midnight .fm27-club-crest{width:38px;height:38px}
  body.fm27-midnight .fm27-nav-actions{gap:4px}
  body.fm27-midnight .fm27-nav-action{flex-basis:32px;min-width:32px;width:32px;height:32px;min-height:32px}
  body.fm27-midnight .fm27-inbox-shortcut{display:none}
  body.fm27-midnight .fm27-header-fixture{min-width:0;width:clamp(120px,36vw,180px);height:43px;margin-left:1px;padding:4px 6px}
  body.fm27-midnight .fm27-header-datetime{font-size:9px;gap:3px}
  body.fm27-midnight .fm27-header-time{font-size:9px;padding:2px 3px}
  body.fm27-midnight .fm27-header-next{font-size:9.7px;gap:3px}
  body.fm27-midnight .fm27-context-inner{padding:0 7px}
  body.fm27-midnight .fm27-context-link{padding:7px 10px}
}
@media (max-width:370px){
  body.fm27-midnight .fm27-header-fixture{width:116px}
  body.fm27-midnight .fm27-header-date{font-size:8px}
  body.fm27-midnight .fm27-header-next>.bi{display:none}
}
