
.button-hover {
  background-color: var(--primary-color);
  color: var(--text-color);
  font-weight: bold;
  border-radius: 0.5rem !important;
  box-shadow: 0 3px 3px 0 rgba(31, 53, 86, 0.15), 0 3px 1px -2px rgba(31, 53, 86, 0.2), 0 1px 5px 0 rgba(31, 53, 86, 0.15)
}

.button-hover-white {
  background-color: white;
  color: var(--primary-color);
  font-weight: bold;
  border-radius: 0.5rem !important;
  box-shadow: 0 3px 3px 0 rgba(31, 53, 86, 0.15), 0 3px 1px -2px rgba(31, 53, 86, 0.2), 0 1px 5px 0 rgba(31, 53, 86, 0.15);
}

.button-hover:disabled, .btn.disabled, .btn:disabled{
  background-color: var(--primary-color);
  color: var(--text-color);
  opacity: 0.6 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

#navbar a {
  padding: 0.5rem;
}

#navbar a:hover {
  background-color: var(--secondary-color);
  color: var(--text-color);
  /* opacity: 0.7; */
  transition: background-color 0.3s ease;
}

/* The brand hover, opt-in.

   This was an unscoped `.btn:hover`, and `.btn` is Bootstrap's base class -- so
   it repainted 369 of the 405 buttons tools/hovers.py probes into this one
   bright secondary blue. The red .btn-danger, the grey "archive" button, the
   transparent .btn-link close, the white icon buttons and the dark toggles all
   landed on #0a5fd6, and !important meant nothing downstream could opt out.
   That is where most of the module templates' !important count came from, and
   the stray hover colours reported against the ESG pages.

   Listed here are the classes that are brand-filled at rest, so blue reads as a
   shade of the button rather than a change of subject. Everything else now
   falls through to Material Dashboard's own per-variant hover: a shadow lift
   for the filled and gradient variants, and a shade of their own colour for the
   light, outline and link ones.

   Verify with `env/bin/python tools/hovers.py diff before after` after any edit
   to this list -- and restart the server first, WhiteNoise resolves static
   files once at startup. */
.button-hover:hover,
.button-hover-white:hover,
.btn-primary:hover,
.btn-notif-view:hover,
.btn-notif-update:hover,
.view-toggle-btn:hover {
  background-color: var(--secondary-color) !important;
  color: var(--text-color) !important;
  transition: background-color 0.3s ease;
}

/* Same problem, smaller blast radius: unscoped, this painted every focused
   button navy -- including, after a click, a red delete button. */
.button-hover:focus,
.button-hover-white:focus,
.btn-primary:focus,
.btn-notif-view:focus,
.btn-notif-update:focus,
.view-toggle-btn:focus {
  background-color: var(--primary-color);
  color: var(--text-color);
}

.notification-bell.button-hover {
  padding: 1.2rem;
}

/* .notification-bell.button-hover:hover used to sit here, repeating the brand
   hover verbatim. .button-hover:hover above already covers it, with !important,
   so it never had an effect of its own. */

/* Icons on a brand-filled control follow that control's hover text colour.

   This was an unscoped `span.material-symbols-outlined:hover`, which is the same
   mistake as the `.btn:hover` above and was made in the same file: --text-color
   resolves to `white` whenever the tenant's primary is dark, so EVERY Material
   Symbols icon in the product -- 283 spans across 53 templates -- turned white on
   hover no matter what was behind it. On any light surface that means the icon
   disappears under the cursor: the back arrow on Manage Your Account, the edit
   pencils on every card, the close crosses in the modals.

   Scoped to the same opt-in list as the brand hover, because those are the controls
   that are brand-FILLED while hovered -- including .button-hover-white, which is
   white at rest but takes the brand fill on hover, so its icon does need to flip.
   Anywhere else an icon keeps its own colour. */
.button-hover:hover span.material-symbols-outlined,
.button-hover-white:hover span.material-symbols-outlined,
.btn-primary:hover span.material-symbols-outlined,
.btn-notif-view:hover span.material-symbols-outlined,
.btn-notif-update:hover span.material-symbols-outlined,
.view-toggle-btn:hover span.material-symbols-outlined {
  color: var(--text-color) !important;
}

span.material-icons-round {
  color: var(--primary-color);
}

/* i.material-icons {
  color: var(--primary-color);
} */

span.material-icons-round:hover {
  color: var(--secondary-color);
}

.modal-header {
  background: var(--primary-color);
}

.modal-title {
  color: var(--text-color);
}

/* Icon-only buttons.

   The <span class="material-symbols-outlined"> inside these is an inline element, so
   in standards mode it sits on the text baseline and reserves descender space beneath
   it -- which made a 40x40 button render 40x46, and pushed the modal header 6px taller
   with it. Quirks mode collapsed that space, so the markup had been relying on it.

   Flex centring removes the baseline from the equation: the icon centres in both axes
   and the box stays square. */
.modal-close-btn,
.notification-bell.button-hover,
.ai-button,
.expert-insight-btn,
.clear-filters-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
