/* ---------------------------------------------------------------------------
   DEV-327 (EAA) — button contrast, WCAG 1.4.3.

   Every button below put white text on a background under 4.5:1. The policy is
   to keep the white text and darken the background: same hue, lower lightness,
   so no text colour changes and no other rule has to move.

   Loaded after the theme bundles from Metronic8/common/head.cshtml and
   Metronic6/common/head.cshtml, so it overrides them without editing the vendor
   files — a Metronic upgrade would wipe direct edits.

   Values signed off by Antonis, 03/09/2026. Ratios are against white.
   --------------------------------------------------------------------------- */

/* --- Metronic 8 -----------------------------------------------------------
   The buttons read var(--kt-*) directly, so redefining the tokens covers the
   base, hover, active and outline variants in one place. Selector mirrors the
   bundle's own (":root, [data-theme=light]") and wins on source order.
   The paired --kt-*-inverse tokens are the text colours; they stay white.     */
:root,
[data-theme=light] {
    --kt-primary:        #268652;   /* was #50CD89 — 2.01:1 -> 4.55:1 */
    --kt-primary-active: #2F8556;   /* was #47BE7D — 2.35:1 -> 4.56:1 */
    --kt-success:        #0075E0;   /* was #2C9AFF — 2.93:1 -> 4.54:1 */
    --kt-success-active: #1173E5;   /* was #2884EF — 3.73:1 -> 4.56:1 */
    --kt-warning:        #B06214;   /* was #E78B2F — 2.58:1 -> 4.56:1 */
    --kt-warning-active: #B16314;   /* was #CE7317 — 3.45:1 -> 4.50:1 */
    --kt-danger:         #E81F11;   /* was #F14C41 — 3.59:1 -> 4.53:1 */
    --kt-danger-active:  #DB3A2F;   /* was #DD4339 — 4.25:1 -> 4.51:1 */
}

/* --- Metronic 6 -----------------------------------------------------------
   This bundle predates the token system and hardcodes the hexes, so the rules
   have to be named. Specificity is matched and source order decides.          */
.btn-success,
.btn-success.disabled,
.btn-success:disabled,
.btn-outline-success:hover,
.btn-label-success:focus,
.btn-label-success:hover {
    background-color: #078761 !important;   /* was #0ABB87 — 2.48:1 -> 4.52:1 */
    border-color: #078761 !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success.focus {
    background-color: #078660 !important;   /* was #08976D — 3.71:1 -> 4.58:1 */
    border-color: #078660 !important;
}

.btn-danger,
.btn-danger.disabled,
.btn-danger:disabled,
.btn-outline-danger:hover,
.btn-label-danger:focus,
.btn-label-danger:hover {
    background-color: #EA024F !important;   /* was #FD397A — 3.48:1 -> 4.55:1 */
    border-color: #EA024F !important;
}

.btn-info,
.btn-info.disabled,
.btn-info:disabled,
.btn-outline-info:hover {
    background-color: #466CE9 !important;   /* was #5578EB — 3.98:1 -> 4.58:1 */
    border-color: #466CE9 !important;
}

.btn-brand,
.btn-brand.disabled,
.btn-brand:disabled,
.btn.btn-default:active,
.btn-outline-brand:hover {
    background-color: #4765FF !important;   /* was #5D78FF — 3.75:1 -> 4.59:1 */
    border-color: #4765FF !important;
}
