/* AXIOM Day Mode final state lock.
   This file intentionally loads after the release stylesheet so legacy
   Night Mode selected-state rules cannot repaint shared controls green. */

html body.light-mode #studio-active-view #active-playlist-container
  .playlist-row.studio-transition-row.axiom-focus-deck-row
  > .studio-smart-btn.button--green-outline {
  border-color: rgba(0, 71, 171, 0.62) !important;
  background: #ffffff !important;
  color: #0047ab !important;
  -webkit-text-fill-color: #0047ab !important;
  box-shadow: none !important;
}

html body.light-mode #studio-active-view #active-playlist-container
  .playlist-row.studio-transition-row.axiom-focus-deck-row:is(.selected, .playing-track)
  > .studio-smart-btn.button--green-outline {
  border-color: #0047ab !important;
  background: #0047ab !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: none !important;
}

html body.light-mode #studio-active-view #active-playlist-container
  .playlist-row.studio-transition-row.axiom-focus-deck-row
  .transition-badge.energy-spine-node,
html body.light-mode #studio-active-view #active-playlist-container
  .playlist-row.studio-transition-row.axiom-focus-deck-row:is(.selected, .playing-track)
  .transition-badge.energy-spine-node {
  border-color: #75a8ff !important;
  background: #ffffff !important;
  color: #0047ab !important;
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.08), 0 0 16px rgba(0, 71, 171, 0.30) !important;
}

html body.light-mode #studio-active-view #active-playlist-container
  .playlist-row.studio-transition-row.axiom-focus-deck-row
  .transition-badge.energy-spine-node .studio-node-bpm-value {
  color: #0047ab !important;
  -webkit-text-fill-color: #0047ab !important;
  text-shadow: none !important;
}

html body.light-mode #studio-active-view #active-playlist-container
  .playlist-row.studio-transition-row.axiom-focus-deck-row
  .transition-badge.energy-spine-node .studio-node-bpm-label {
  color: #40516a !important;
  -webkit-text-fill-color: #40516a !important;
  text-shadow: none !important;
}

html body.light-mode #studio-active-view #active-playlist-container
  .playlist-row.studio-transition-row .transition-badge.energy-spine-node::after {
  background: linear-gradient(180deg, rgba(0, 71, 171, 0.30), #70a5ff 48%, rgba(0, 71, 171, 0.36)) !important;
  box-shadow: 0 0 5px rgba(0, 71, 171, 0.45), 0 0 13px rgba(0, 71, 171, 0.28) !important;
}

html body.light-mode #replacement-modal #modal-suggestions-list
  .anchor-suggestion-row.axiom-focus-deck-row:is(.selected, .active-suggestion)
  .anchor-suggestion-add,
html body.light-mode #replacement-modal #modal-suggestions-list
  .anchor-suggestion-row.axiom-focus-deck-row:is(.selected, .active-suggestion)
  .anchor-decision-btn.active {
  border-color: #0047ab !important;
  background: #0047ab !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: none !important;
}

html body.light-mode #health-inbox-app#health-inbox-app .health-detail-state.healthy,
html body.light-mode #health-inbox-app#health-inbox-app .health-detail-list-row b {
  border-color: rgba(0, 71, 171, 0.42) !important;
  color: #0047ab !important;
  -webkit-text-fill-color: #0047ab !important;
  text-shadow: none !important;
}

/* Day Mode alignment pass: Library rows keep every fixed control inside the
   card while giving the title and status chips separate breathing lanes. */
html body.light-mode #tab-content-library.library-cockpit
  #search-results .library-track-card.axiom-focus-deck-row {
  grid-template-columns: 60px minmax(176px, 1fr) 62px 54px 58px 34px !important;
  column-gap: 7px !important;
  padding-right: 10px !important;
}

html body.light-mode #tab-content-library.library-cockpit
  #search-results .library-track-card.axiom-focus-deck-row .library-meta-line {
  margin-bottom: 3px !important;
}

html body.light-mode #tab-content-library.library-cockpit
  #search-results .library-track-card.axiom-focus-deck-row .library-health-chips {
  margin-top: 2px !important;
  gap: 6px !important;
}

html body.light-mode #tab-content-library.library-cockpit
  #search-results .library-track-card.axiom-focus-deck-row > :is(
    .library-bpm-cell,
    .library-key-cell,
    .library-add-btn,
    .fav-star-btn
  ) {
  position: relative !important;
  top: -4px !important;
}

/* The Library Matching Songs rail owns its grid column. Remove the legacy
   fixed width and margin so its cards cannot be clipped by the viewport. */
html body.light-mode #tab-content-library.library-cockpit #smart-links-panel.recommendations-panel {
  width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  padding: 18px 14px !important;
  overflow: hidden !important;
}

html body.light-mode #tab-content-library.library-cockpit
  #smart-links-panel .recommendations-controls {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: center !important;
}

html body.light-mode #tab-content-library.library-cockpit
  #smart-links-panel .recommendations-controls :is(button, select) {
  width: 100% !important;
  min-width: 0 !important;
}

html body.light-mode #tab-content-library.library-cockpit
  #smart-links-panel .recommendations-controls .root-help {
  grid-column: 2 !important;
  grid-row: 3 !important;
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: end !important;
  border: 1px solid rgba(0, 71, 171, 0.34) !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  color: #0047ab !important;
  -webkit-text-fill-color: #0047ab !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}

html body.light-mode #tab-content-library.library-cockpit
  #smart-links-panel #lmod-count {
  grid-column: 1 !important;
  grid-row: 3 !important;
}

@media (min-width: 1181px) and (max-width: 1500px) {
  html body.light-mode #tab-content-library.library-cockpit .library-brief-chip-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 7px !important;
  }

  html body.light-mode #tab-content-library.library-cockpit .library-brief-chips {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    overflow: hidden !important;
  }

  html body.light-mode #tab-content-library.library-cockpit
    .library-brief-chips .library-brief-chip.button--small {
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: 6px !important;
    font-size: 8px !important;
  }
}

/* Matching Songs filter order: count first, information last, flush against
   the Transition panel. The search remains the flexible first control. */
html body.light-mode #replacement-modal.anchor-dj-modal .anchor-filter-bar {
  grid-template-columns: minmax(220px, 1fr) 136px 126px 110px 110px 112px 32px !important;
}

html body.light-mode #replacement-modal.anchor-dj-modal #mod-count {
  grid-column: 6 !important;
  grid-row: 1 !important;
}

html body.light-mode #replacement-modal.anchor-dj-modal .anchor-filter-bar > .root-help {
  grid-column: 7 !important;
  grid-row: 1 !important;
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(0, 71, 171, 0.34) !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  color: #0047ab !important;
  -webkit-text-fill-color: #0047ab !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}

/* Musical values are not table cells. Clear the accidental vertical bands
   and keep one intentional key box instead of a nested double border. */
html body.light-mode #replacement-modal#replacement-modal.anchor-dj-modal
  #modal-suggestions-list .anchor-suggestion-bpm.anchor-suggestion-bpm,
html body.light-mode #replacement-modal#replacement-modal.anchor-dj-modal
  #modal-suggestions-list .anchor-suggestion-key.anchor-suggestion-key,
html body.light-mode #replacement-modal#replacement-modal.anchor-dj-modal
  #modal-suggestions-list .anchor-suggestion-match.anchor-suggestion-match {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.light-mode #replacement-modal#replacement-modal.anchor-dj-modal
  #modal-suggestions-list .anchor-suggestion-key strong {
  border: 1px solid rgba(8, 145, 178, 0.46) !important;
  background: #f0fbfd !important;
  box-shadow: none !important;
}

/* Health remains a light cockpit in Day Mode, including confirmations that
   are mounted at body level rather than inside the Health tab. */
html body.light-mode #health-inbox-app#health-inbox-app .health-overall-band {
  border-color: rgba(0, 71, 171, 0.34) !important;
  background: #eef4ff !important;
  box-shadow: none !important;
}

html body.light-mode #health-inbox-app#health-inbox-app .health-overall-band b {
  color: #0047ab !important;
  -webkit-text-fill-color: #0047ab !important;
}

html body.light-mode #health-inbox-app#health-inbox-app .health-overall-band em {
  color: #40516a !important;
  -webkit-text-fill-color: #40516a !important;
  opacity: 1 !important;
}

html body.light-mode #health-inbox-app#health-inbox-app .health-detail-action.danger {
  outline: 0 !important;
  box-shadow: none !important;
}

html body.light-mode #health-inbox-app#health-inbox-app .health-detail-action.danger:focus-visible {
  outline: 2px solid #c81e1e !important;
  outline-offset: 2px !important;
}

html body.light-mode #axiom-modal-overlay {
  background: rgba(7, 17, 31, 0.36) !important;
  backdrop-filter: blur(8px) saturate(0.9) !important;
}

html body.light-mode #axiom-modal-card {
  background: linear-gradient(145deg, #ffffff, #f2f6ff) !important;
  color: #07111f !important;
  box-shadow: 0 26px 72px rgba(7, 17, 31, 0.22) !important;
}

html body.light-mode #axiom-modal-card[data-variant="health-all"] {
  --system-accent: #0047ab !important;
}

html body.light-mode #axiom-modal-card::before {
  background: linear-gradient(90deg, transparent, var(--system-accent), transparent) !important;
}

html body.light-mode #axiom-modal-card :is(#axiom-modal-title, #axiom-modal-body) {
  color: #07111f !important;
  -webkit-text-fill-color: #07111f !important;
}

html body.light-mode #axiom-modal-card #axiom-modal-body {
  color: #40516a !important;
  -webkit-text-fill-color: #40516a !important;
}

html body.light-mode #axiom-modal-card #axiom-modal-safety {
  background: color-mix(in srgb, var(--system-accent) 8%, #ffffff) !important;
  color: #24364f !important;
  -webkit-text-fill-color: #24364f !important;
}

html body.light-mode #axiom-modal-card .modal-btn-secondary {
  border-color: rgba(0, 71, 171, 0.28) !important;
  background: #ffffff !important;
  color: #0047ab !important;
  -webkit-text-fill-color: #0047ab !important;
  box-shadow: none !important;
}

html body.light-mode #axiom-modal-card .modal-btn-danger {
  border-color: #c81e1e !important;
  background: #c81e1e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: none !important;
}
