/*# sourceMappingURL=custom.min.css.map */

/* ===========================================================================
   BUG-28 / BUG-30: accessible button variants.

   Velzon's shipped button colours do not meet WCAG AA for their own label.
   Measured against the compiled assets/css in this repo, white text on the
   stock backgrounds:

       btn-warning    1.76:1      btn-danger     3.15:1
       btn-success    2.64:1      btn-secondary  4.15:1
       btn-info       3.06:1

   Only btn-primary (7.62) and btn-dark (15.43) passed. btn-success is the
   Approve button on every approval queue in this application, so the most
   consequential control in the product was the second worst offender.

   The soft variants were worse, and failed in different themes:

       light   soft-warning 1.62  soft-success 2.29  soft-info 2.62
               soft-danger  2.68  soft-secondary 3.46
       dark    soft-primary 1.85  soft-secondary 3.14  soft-danger 4.02
               soft-info    4.05

   Every soft variant failed in at least one theme. They also invert to the
   solid colour with white text on hover, which is the same failing pair
   again, so the hover state is fixed here too.

   APPROACH
   Only the --vz-btn-* custom properties are touched, never --vz-success and
   friends. Those same variables drive .text-success, .bg-success-subtle,
   borders and chart series; moving them would repaint the whole app to fix
   buttons. Hue is preserved throughout, so green still means approve and red
   still means reject - the colours are darkened, not replaced.

   Amber is the exception: reaching 4.5:1 with white text needs a 30%
   lightness drop, which turns it brown. It keeps its colour and takes dark
   text instead, at 9.62:1.

   The theme palette is identical in light and dark (--vz-success and the
   rest do not change), so the solid rules below need no theme split. The
   soft rules do, because their background composites against the card.

   Every ratio in this file was measured in the browser against the real
   cascade, in both themes, not calculated from the source values.
   =========================================================================== */

/* --- Solid: darken the background, keep white text ------------------------ */

.btn-success {
    --vz-btn-bg: #078574;                    /* was #0ab39c, 2.64:1 -> 4.55:1 */
    --vz-btn-border-color: #078574;
    --vz-btn-hover-bg: #05685b;              /* 6.69:1 */
    --vz-btn-hover-border-color: #05685b;
    --vz-btn-active-bg: #05685b;
    --vz-btn-active-border-color: #05685b;
    --vz-btn-disabled-bg: #078574;
    --vz-btn-disabled-border-color: #078574;
}

.btn-danger {
    --vz-btn-bg: #de3512;                    /* was #f06548, 3.15:1 -> 4.54:1 */
    --vz-btn-border-color: #de3512;
    --vz-btn-hover-bg: #c22e10;              /* 5.69:1 */
    --vz-btn-hover-border-color: #c22e10;
    --vz-btn-active-bg: #c22e10;
    --vz-btn-active-border-color: #c22e10;
    --vz-btn-disabled-bg: #de3512;
    --vz-btn-disabled-border-color: #de3512;
}

.btn-info {
    --vz-btn-bg: #1e7db2;                    /* was #299cdb, 3.06:1 -> 4.53:1 */
    --vz-btn-border-color: #1e7db2;
    --vz-btn-hover-bg: #1a6b98;              /* 5.83:1 */
    --vz-btn-hover-border-color: #1a6b98;
    --vz-btn-active-bg: #1a6b98;
    --vz-btn-active-border-color: #1a6b98;
    --vz-btn-disabled-bg: #1e7db2;
    --vz-btn-disabled-border-color: #1e7db2;
}

.btn-secondary {
    --vz-btn-bg: #2a6ff0;                    /* was #3577f1, 4.15:1 -> 4.54:1 */
    --vz-btn-border-color: #2a6ff0;
    --vz-btn-hover-bg: #115deb;              /* 5.54:1 */
    --vz-btn-hover-border-color: #115deb;
    --vz-btn-active-bg: #115deb;
    --vz-btn-active-border-color: #115deb;
    --vz-btn-disabled-bg: #2a6ff0;
    --vz-btn-disabled-border-color: #2a6ff0;
}

/* Amber keeps its colour and takes dark text: 1.76:1 -> 9.62:1. */
.btn-warning {
    --vz-btn-color: #161c2d;
    --vz-btn-hover-color: #161c2d;
    --vz-btn-active-color: #161c2d;
    --vz-btn-disabled-color: #161c2d;
}

/* --- Soft: readable label at rest, and a solid hover that also passes ----- */

.btn-soft-success {
    --vz-btn-color: #077a6b;                 /* on #daf4f0, 2.29:1 -> 4.53:1 */
    --vz-btn-hover-bg: #078574;
    --vz-btn-active-bg: #078574;
}

.btn-soft-danger {
    --vz-btn-color: #ca3011;                 /* on #fde8e4, 2.68:1 -> 4.52:1 */
    --vz-btn-hover-bg: #de3512;
    --vz-btn-active-bg: #de3512;
}

.btn-soft-info {
    --vz-btn-color: #1b72a2;                 /* on #dff0fa, 2.62:1 -> 4.53:1 */
    --vz-btn-hover-bg: #1e7db2;
    --vz-btn-active-bg: #1e7db2;
}

.btn-soft-secondary {
    --vz-btn-color: #115eee;                 /* on #e1ebfd, 3.46:1 -> 4.52:1 */
    --vz-btn-hover-bg: #115deb;
    --vz-btn-active-bg: #115deb;
}

.btn-soft-warning {
    --vz-btn-color: #9c6507;                 /* on #fef4e4, 1.62:1 -> 4.51:1 */
    --vz-btn-hover-color: #161c2d;
    --vz-btn-active-color: #161c2d;
}

/* Dark theme: the soft background composites against the dark card instead
   of white, so the label has to move the other way - lighter, not darker. */

[data-bs-theme="dark"] .btn-soft-primary {
    --vz-btn-color: #8190c4;                 /* on #262c37, 1.85:1 -> 4.51:1 */
}

[data-bs-theme="dark"] .btn-soft-danger {
    --vz-btn-color: #f2755b;                 /* on #402f2e, 4.02:1 -> 4.51:1 */
}

[data-bs-theme="dark"] .btn-soft-info {
    --vz-btn-color: #3ca5de;                 /* on #223744, 4.05:1 -> 4.50:1 */
}

[data-bs-theme="dark"] .btn-soft-secondary {
    --vz-btn-color: #6497f4;                 /* on #243147, 3.14:1 -> 4.52:1 */
}

/* soft-success (4.60) and soft-warning (6.30) already pass on dark, so their
   light-theme labels above are deliberately not carried over. */
[data-bs-theme="dark"] .btn-soft-success {
    --vz-btn-color: #0ab39c;
}

[data-bs-theme="dark"] .btn-soft-warning {
    --vz-btn-color: #f7b84b;
}
