/*
  Global button contrast fix for DSP.WEB / Blazor.
  Add this stylesheet AFTER Bootstrap, MudBlazor, app.css and component styles.
  Keeps button actions unchanged; only adjusts visual contrast.
*/

/* Filled Bootstrap buttons: readable text in normal and interactive states */
.btn-success,
.btn-success:visited,
.btn-success:hover,
.btn-success:focus,
.btn-success:focus-visible,
.btn-success:active,
.btn-success.active,
.btn-success:disabled,
.btn-success.disabled {
    color: #fff !important;
}

.btn-success {
    background-color: #246b35 !important;
    border-color: #246b35 !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:focus-visible {
    background-color: #195528 !important;
    border-color: #195528 !important;
}

.btn-success:active,
.btn-success.active {
    background-color: #14451f !important;
    border-color: #14451f !important;
}

/* Outline-success buttons: dark green text on white until hover */
.btn-outline-success,
.btn-outline-success:visited {
    color: #17652b !important;
    background-color: #fff !important;
    border-color: #247a3b !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:focus-visible,
.btn-outline-success:active,
.btn-outline-success.active {
    color: #fff !important;
    background-color: #246b35 !important;
    border-color: #246b35 !important;
}

/* Ensure nested labels/icons inherit the button's readable foreground */
button.btn-success *,
button.btn-outline-success:hover *,
button.btn-outline-success:focus *,
button.btn-outline-success:active * {
    color: inherit !important;
}

/* Avoid faded text on enabled buttons caused by generic opacity rules */
button.btn-success:not(:disabled),
button.btn-outline-success:not(:disabled) {
    opacity: 1;
}

/* Other common Bootstrap filled buttons: preserve semantic colors but enforce contrast */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-dark,
.btn-info,
.btn-warning {
    font-weight: 500;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-dark {
    color: #fff !important;
}

.btn-info,
.btn-warning {
    color: #17202a !important;
}

/* Focus indicator remains visible for keyboard users */
.btn:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}
