/* One compact, readable navigation system on every public MoFutbol route. */
:root {
  --mf-global-header-height: 54px;
  --mf-global-ticker-height: 60px;
}

/* Reserve the asynchronously rendered shell so the page does not jump on load. */
html [data-site-header]:empty {
  display: block;
  min-height: calc(var(--mf-global-header-height) + var(--mf-global-ticker-height));
  background: #050b08;
}

@media (max-width: 700px) {
  html [data-site-header]:empty {
    min-height: calc(var(--mf-global-header-height) + var(--mf-global-ticker-height));
  }
}

/* The shared header is in normal document flow. Remove the legacy offset that
   was reserved for the former fixed header and created a blank strip above it. */
html body.site-app-ready {
  padding-top: 0 !important;
}

html body .site-header {
  top: 0 !important;
  min-height: var(--mf-global-header-height) !important;
}

html body .site-header .site-header__inner {
  width: min(calc(100% - 24px), 100rem) !important;
  max-width: 100rem !important;
  min-height: var(--mf-global-header-height) !important;
  gap: 8px !important;
  padding-block: 4px !important;
}

html body .site-header .site-brand {
  min-width: max-content !important;
}

html body .site-header .site-brand__logo {
  width: 34px !important;
  height: 34px !important;
}

html body .site-header .site-brand__tag {
  line-height: 1.1;
}

html body .site-header .site-nav {
  min-width: 0 !important;
  overflow: visible !important;
}

html body .site-header .site-nav__list {
  justify-content: center !important;
  gap: 2px !important;
}

html body .site-header .site-nav :where(.site-nav__link, .site-nav__toggle) {
  min-height: 44px !important;
  padding-inline: 7px !important;
  font-size: 0.68rem !important;
}

html body .site-header .site-header__actions {
  flex: 0 0 auto !important;
  gap: 5px !important;
}

/* Shared command-menu structure. Some focused PHP routes intentionally ship
   only the base component CSS; keep their menus identical to the full public
   pages instead of letting legacy block-link rules collapse the panel copy. */
html body .site-header .site-nav__panel {
  display: grid !important;
  gap: 0.5rem !important;
  overflow: hidden;
  z-index: 1200 !important;
  background: #08120d !important;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.52) !important;
}

/* The navigation builder keeps every menu in the DOM, then marks inactive
   panels with the native `hidden` attribute. The shared grid rule above must
   not override that state, or an inactive off-screen panel widens the page. */
html body .site-header .site-nav__panel[hidden] {
  display: none !important;
}

html body .site-header .site-nav__panel-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0.15rem 0.35rem;
}

html body .site-header .site-nav__panel-head > span {
  color: var(--stl-gold, #f5c842);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html body .site-header .site-nav__panel-head > small {
  color: var(--color-muted, #aeb9ad);
  font-size: 0.67rem;
  white-space: nowrap;
}

html body .site-header .site-nav__panel-grid {
  display: grid !important;
  gap: 0.4rem !important;
}

html body .site-header .site-nav__panel[data-nav-size="medium"] {
  min-width: min(28rem, calc(100vw - 2rem)) !important;
}

html body .site-header .site-nav__panel[data-nav-size="large"] {
  min-width: min(34rem, calc(100vw - 2rem)) !important;
}

html body .site-header .site-nav__panel[data-nav-size="medium"] .site-nav__panel-grid,
html body .site-header .site-nav__panel[data-nav-size="large"] .site-nav__panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html body .site-header .site-nav__panel[data-nav-size="medium"] .site-nav__panel-grid > a:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

html body .site-header .site-nav__panel :where(.site-nav__panel-feature, .site-nav__panel-grid > a) {
  display: grid !important;
  grid-template-columns: 2rem minmax(0, 1fr) 1.35rem !important;
  align-items: center !important;
  column-gap: 0.65rem !important;
  min-height: 4.1rem !important;
  padding: 0.7rem 0.75rem !important;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.7rem;
}

html body .site-header .site-nav__panel-icon {
  display: inline-grid !important;
  place-items: center;
  width: 2rem !important;
  height: 2rem !important;
  line-height: 1 !important;
}

html body .site-header .site-nav__panel-copy {
  display: block !important;
  min-width: 0;
}

html body .site-header .site-nav__panel-copy > span,
html body .site-header .site-nav__panel-copy small {
  display: block !important;
  overflow-wrap: anywhere;
}

html body .site-header .site-nav__panel-copy > span {
  color: var(--color-text, #f5f6f0);
  font-weight: 800;
  line-height: 1.15;
}

html body .site-header .site-nav__panel-copy small {
  margin-top: 0.18rem;
  color: var(--color-muted, #aeb9ad);
  font-size: 0.75rem;
  line-height: 1.35;
}

html body .site-header .site-nav__panel-arrow {
  display: inline-grid !important;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
}

/* Preserve the primary Match Center action on desktop while reducing brand copy
   before the navigation needs to collapse into the drawer. */
@media (max-width: 1500px) {
  html body .site-header .site-brand__tag {
    display: none !important;
  }
}

/* Change to the full drawer before desktop controls can collide. */
@media (max-width: 1280px) {
  html body .site-header .site-header__inner {
    grid-template-columns: auto 1fr auto !important;
  }

  html body .site-header .site-nav {
    display: none !important;
  }

  html body .site-header .site-nav__menu-button {
    display: inline-flex !important;
  }
}

@media (max-width: 980px) {
  :root {
    --mf-global-header-height: 54px;
    --mf-global-ticker-height: 60px;
  }

  html body .site-header .site-header__inner {
    width: 100% !important;
    padding-inline: 14px !important;
  }

}

@media (max-width: 640px) {
  html body .site-header .site-brand__tag {
    display: none !important;
  }

  html body .site-header .site-header__actions {
    min-width: 0 !important;
  }

  html body .site-header :where(.site-header__search, .site-header__cta) {
    display: none !important;
  }

}

/* Mobile command drawer: a single readable navigation list, independent of
   the desktop menu's icon-and-copy layout. This keeps labels, descriptions,
   and disclosure counts from running together on narrow screens. */
@media (max-width: 1280px) {
  html body .site-drawer {
    inset: var(--mf-global-header-height) 0 0 auto !important;
    width: min(100%, 27rem) !important;
    max-width: 100% !important;
    min-height: calc(100dvh - var(--mf-global-header-height)) !important;
    max-height: calc(100dvh - var(--mf-global-header-height)) !important;
    padding: 12px 14px max(20px, env(safe-area-inset-bottom)) !important;
    gap: 8px !important;
    background: #07100b !important;
    border-left: 1px solid rgba(214, 255, 31, 0.18) !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
  }

  html body .site-drawer__search {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    border: 1px solid rgba(214, 255, 31, 0.28) !important;
    border-radius: 12px !important;
    background: linear-gradient(100deg, #ffe13a, #a8f237 58%, #4cdd7d) !important;
    color: #07100b !important;
    font-family: var(--font-display, var(--font-sans)) !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-align: left !important;
  }

  html body .site-drawer__quick {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    padding: 6px !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.025) !important;
  }

  html body .site-drawer__quick-link:first-child {
    grid-column: auto !important;
  }

  html body .site-drawer__section {
    display: grid !important;
    gap: 4px !important;
    padding: 0 !important;
  }

  html body .site-drawer__single {
    padding: 0 !important;
  }

  html body .site-drawer :where(.site-drawer__quick-link, .site-drawer__single > a, .site-drawer__links > a) {
    display: block !important;
    min-height: 48px !important;
    padding: 10px 13px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    color: #edf4ea !important;
    background: transparent !important;
    text-decoration: none !important;
  }

  html body .site-drawer :where(.site-drawer__quick-link, .site-drawer__single > a, .site-drawer__links > a):hover,
  html body .site-drawer :where(.site-drawer__quick-link, .site-drawer__single > a, .site-drawer__links > a):focus-visible,
  html body .site-drawer :where(.site-drawer__quick-link, .site-drawer__single > a, .site-drawer__links > a)[aria-current="page"] {
    color: #ffffff !important;
    border-color: rgba(214, 255, 31, 0.22) !important;
    background: rgba(214, 255, 31, 0.1) !important;
  }

  html body .site-drawer__link-copy {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2px !important;
    min-width: 0 !important;
  }

  html body .site-drawer__link-label {
    display: block !important;
    color: inherit !important;
    font-family: var(--font-display, var(--font-sans)) !important;
    font-size: 0.96rem !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
  }

  html body .site-drawer__link-description {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    color: #aab9aa !important;
    font-family: var(--font-sans, sans-serif) !important;
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
  }

  html body .site-drawer__group {
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.018) !important;
  }

  html body .site-drawer__group > summary {
    display: flex !important;
    align-items: center !important;
    min-height: 48px !important;
    padding: 10px 13px !important;
    color: #edf4ea !important;
  }

  html body .site-drawer__group-label {
    font-family: var(--font-display, var(--font-sans)) !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  html body .site-drawer__title-count {
    display: block !important;
    margin-left: auto !important;
    padding-left: 0.55rem !important;
    border-left: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #8fa08f !important;
    font-family: var(--font-mono, monospace) !important;
    font-size: 0.64rem !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }

  html body .site-drawer__links {
    gap: 3px !important;
    padding: 0 6px 6px !important;
  }
}

@media (max-width: 640px) {
  html body.site-app-ready .site-drawer {
    width: 100% !important;
    border-left: 0 !important;
  }
}

@media (max-width: 760px) {
  body.mf-contributor-login-v2 #main-content {
    display: block;
    padding: 0 0 3rem;
  }

  body.mf-contributor-login-v2 .mf-contributor-login-v2__brand {
    min-height: 0;
    gap: 1.25rem;
    padding: 1.25rem;
  }

  body.mf-contributor-login-v2 .mf-contributor-login-v2__brand h1 {
    max-width: 12ch;
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  body.mf-contributor-login-v2 .mf-contributor-login-v2__brand-copy {
    margin-top: 0.6rem;
    line-height: 1.45;
  }

  body.mf-contributor-login-v2 .mf-contributor-login-v2__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  body.mf-contributor-login-v2 .mf-contributor-login-v2__steps li {
    min-height: auto;
    padding: 0.55rem;
  }

  body.mf-contributor-login-v2 .mf-contributor-login-v2__steps span {
    font-size: 0.66rem;
  }
}

@media (max-width: 390px) {
  body.mf-contributor-login-v2 .mf-contributor-login-v2__steps span {
    display: none;
  }
}
