/* V288 — exact global selected/pressed state.
   Reference: sidebar selected item from the approved screenshot.
   One visual language everywhere: borderless mint gradient, dark text,
   no underline/green outline/pressed translation. Loaded after every legacy layer. */
:root{
  --fm-selected-a:#aad7bb;
  --fm-selected-b:#cde6d7;
  --fm-selected-c:#f0f7f2;
  --fm-selected-text:#102319;
  --fm-selected-hover:#f5faf7;
  --fm-control-border:#9fd0b1;
  --fm-selected-shadow:0 2px 8px rgba(39,104,65,.055);
}

/* Canonical persistent selected state. Keep this list deliberately focused on
   interactive navigation/choice controls; panels/cards that merely use .active
   for visibility are not restyled. */
html body .menu a.active,
html body .main-nav a.active,
html body .game-top-nav a.active,
html body .subnav a.active,
html body .competition-nav > a.active,
html body .player-tabs .tab-btn.active,
html body .tactic-tabs .tab-btn.active,
html body button.tab-btn.active,
html body a.tab-btn.active,
html body .filter-btn.active,
html body .stats-tab.active,
html body .stats-kind.active,
html body .nav-btn.active,
html body .tour-tab.active,
html body .calendar-tab.active,
html body .comp-tab.active,
html body .country-btn.active,
html body .country-pill.active,
html body .country-toolbar button.active,
html body .league-btn.active,
html body .small-btn.active,
html body .speed-choice.active,
html body .transfer-tab.active,
html body .folder.active,
html body .application-select-grid button.active,
html body button.selected,
html body .manager-avatar-choice.selected,
html body .portrait-choice.selected,
html body [role="tab"][aria-selected="true"],
html body button[aria-pressed="true"],
html body a[aria-current="page"]{
  background:linear-gradient(90deg,var(--fm-selected-a) 0%,var(--fm-selected-b) 58%,var(--fm-selected-c) 100%)!important;
  color:var(--fm-selected-text)!important;
  -webkit-text-fill-color:var(--fm-selected-text)!important;
  border:1px solid transparent!important;
  outline:0!important;
  box-shadow:var(--fm-selected-shadow)!important;
  text-shadow:none!important;
  transform:none!important;
  filter:none!important;
}

/* Children on old pages often force white/green text. */
html body .menu a.active *,
html body .main-nav a.active *,
html body .competition-nav > a.active *,
html body .tab-btn.active *,
html body .filter-btn.active *,
html body .stats-tab.active *,
html body .stats-kind.active *,
html body .nav-btn.active *,
html body .tour-tab.active *,
html body .calendar-tab.active *,
html body .comp-tab.active *,
html body .country-btn.active *,
html body .country-pill.active *,
html body .league-btn.active *,
html body .small-btn.active *,
html body .speed-choice.active *,
html body .transfer-tab.active *,
html body [role="tab"][aria-selected="true"] *,
html body button[aria-pressed="true"] *{
  color:var(--fm-selected-text)!important;
  -webkit-text-fill-color:var(--fm-selected-text)!important;
  text-shadow:none!important;
}

/* Player page used an extra underline; the approved reference has none. */
html body.player-page .player-tabs .tab-btn.active::after{
  content:none!important;
  display:none!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Inactive selector controls stay neutral so the selected mint state is obvious.
   Sidebar links are intentionally excluded: their inactive state is already the
   clean borderless menu shown in the reference screenshot. */
html body .main-nav a:not(.active),
html body .game-top-nav a:not(.active),
html body .competition-nav > a:not(.active),
html body .player-tabs .tab-btn:not(.active),
html body .tactic-tabs .tab-btn:not(.active),
html body button.tab-btn:not(.active),
html body a.tab-btn:not(.active),
html body .filter-btn:not(.active),
html body .stats-tab:not(.active),
html body .stats-kind:not(.active),
html body .nav-btn:not(.active),
html body .tour-tab:not(.active),
html body .calendar-tab:not(.active),
html body .comp-tab:not(.active),
html body .country-btn:not(.active),
html body .country-pill:not(.active),
html body .country-toolbar button:not(.active),
html body .league-btn:not(.active),
html body .small-btn:not(.active),
html body .speed-choice:not(.active),
html body .transfer-tab:not(.active){
  background:#fff!important;
  color:#17231c!important;
  -webkit-text-fill-color:#17231c!important;
  border:1px solid var(--fm-control-border)!important;
  box-shadow:none!important;
  text-shadow:none!important;
  transform:none!important;
}

/* Hover is only a faint preview, never as strong as a true selected state. */
html body .main-nav a:not(.active):hover,
html body .competition-nav > a:not(.active):hover,
html body .player-tabs .tab-btn:not(.active):hover,
html body .tactic-tabs .tab-btn:not(.active):hover,
html body button.tab-btn:not(.active):hover:not(:disabled),
html body .filter-btn:not(.active):hover:not(:disabled),
html body .country-btn:not(.active):hover:not(:disabled),
html body .country-pill:not(.active):hover,
html body .league-btn:not(.active):hover:not(:disabled),
html body .small-btn:not(.active):hover:not(:disabled){
  background:var(--fm-selected-hover)!important;
  border-color:#8fc5a4!important;
  color:#17231c!important;
  box-shadow:none!important;
}

/* Actual mouse/touch press: same approved mint language everywhere. */
html body button:active:not(:disabled),
html body input[type="button"]:active:not(:disabled),
html body input[type="submit"]:active:not(:disabled),
html body a.button:active,
html body a.green-btn:active,
html body a.outline-btn:active,
html body a.soft-btn:active,
html body .menu a:active,
html body .main-nav a:active,
html body .game-top-nav a:active,
html body .subnav a:active,
html body .competition-nav > a:active,
html body .country-pill:active,
html body .folder:active{
  background:linear-gradient(90deg,var(--fm-selected-a) 0%,var(--fm-selected-b) 58%,var(--fm-selected-c) 100%)!important;
  color:var(--fm-selected-text)!important;
  -webkit-text-fill-color:var(--fm-selected-text)!important;
  border-color:transparent!important;
  box-shadow:var(--fm-selected-shadow)!important;
  text-shadow:none!important;
  transform:none!important;
  filter:none!important;
}

/* .active means "upgrade available" here, not a selected tab. Preserve the tiny
   training arrow instead of turning it into the navigation state. */
html body.training-page .attrs-area .up-btn.active,
html body.training-page .attrs-area .up-btn.active:hover{
  width:16px!important;
  min-width:16px!important;
  height:18px!important;
  min-height:18px!important;
  padding:0!important;
  border-radius:5px!important;
  background:linear-gradient(135deg,#a8ddbb,#eff9f3)!important;
  border:1px solid #9bd0ad!important;
  color:#174e2d!important;
  -webkit-text-fill-color:#174e2d!important;
  box-shadow:none!important;
  transform:none!important;
}

html body button:disabled,
html body button.active:disabled,
html body [aria-disabled="true"]{
  opacity:.52!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
}
