/*
 * Nova Hub – Primary Button Contrast Fix
 * Helle Türkis-/Cyan-Buttons benötigen dunkle Schrift.
 */

:root{
  --nova-primary-bg:#39e1dd;
  --nova-primary-bg-hover:#63eee8;
  --nova-primary-fg:#021d22;
  --nova-primary-border:rgba(74,238,231,.72);
}

/*
 * Primäraktionen aus den verschiedenen Nova-Hub-Modulen.
 * Die Selektoren greifen nur auf echte Links/Buttons mit Primary-Markierung
 * oder auf bekannte Primary-Button-Klassen zu.
 */
:is(
  a,
  button,
  input[type="submit"],
  input[type="button"]
):is(
  .primary,
  .btn-primary,
  .primary-btn,
  .button-primary,
  .nova-primary,
  .community-btn.primary,
  .profile4-save,
  .rm-primary,
  .admin-primary,
  .ncc-primary
){
  color:var(--nova-primary-fg)!important;
  -webkit-text-fill-color:var(--nova-primary-fg)!important;
  text-shadow:none!important;
  font-weight:800;
}

/*
 * Viele Module verwenden Klassen wie "management-btn primary",
 * "hero-button primary" usw.
 */
a[class~="primary"],
button[class~="primary"]{
  color:var(--nova-primary-fg)!important;
  -webkit-text-fill-color:var(--nova-primary-fg)!important;
  text-shadow:none!important;
}

/*
 * Für Buttons, die mit Nova-Cyan als explizitem Hintergrund gestaltet sind.
 * Bewusst nur bekannte semantische Button-Klassen, nicht jedes Element.
 */
:is(
  .profile4-save,
  .rm-primary,
  .admin-primary,
  .ncc-primary
){
  background:linear-gradient(
    135deg,
    var(--nova-primary-bg),
    #24d7d1
  )!important;
  border-color:var(--nova-primary-border)!important;
}

:is(
  a,
  button,
  input[type="submit"],
  input[type="button"]
):is(
  .primary,
  .btn-primary,
  .primary-btn,
  .button-primary,
  .nova-primary,
  .community-btn.primary,
  .profile4-save,
  .rm-primary,
  .admin-primary,
  .ncc-primary
):hover{
  color:#01171b!important;
  -webkit-text-fill-color:#01171b!important;
  text-shadow:none!important;
}

/*
 * Verhindert, dass verschachtelte <span>/<strong>-Elemente ihre alte,
 * helle Textfarbe behalten.
 */
:is(
  a,
  button
):is(
  .primary,
  .btn-primary,
  .primary-btn,
  .button-primary,
  .nova-primary,
  .community-btn.primary,
  .profile4-save,
  .rm-primary,
  .admin-primary,
  .ncc-primary
) :is(span,strong,b,small){
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
}

/* Gute Fokusdarstellung ohne die Lesbarkeit zu verschlechtern. */
:is(a,button):focus-visible{
  outline:2px solid #75fff7;
  outline-offset:3px;
}
