/*
 * [SERE-MOD] Global button-readability fix.
 *
 * The site themes (taghvim / classic / magazine) all set a blanket
 *   .btn { color: var(--vr-color-white); }
 *   .btn:hover, .btn:active, .btn:focus { color: var(--vr-color-white) !important; }
 *
 * This breaks every outline / light button variant because their bg is
 * white-ish and the inherited text colour is also white — text becomes
 * invisible in the default state. The hover state actually fills the
 * button with the variant colour, so white text there IS correct.
 *
 * This file is loaded LAST in <head> so it wins the cascade. We restore
 * sensible default-state text colours for every outline + light variant,
 * and keep hover behaviour matching Bootstrap defaults (white text on a
 * filled bg).
 */

/* ── DEFAULT STATE: text matches the variant's accent ────────────── */
.btn-outline-primary    { color: var(--bs-primary,    #0d6efd) !important; }
.btn-outline-secondary  { color: var(--bs-secondary,  #6c757d) !important; }
.btn-outline-success    { color: var(--bs-success,    #198754) !important; }
.btn-outline-danger     { color: var(--bs-danger,     #dc3545) !important; }
.btn-outline-warning    { color: var(--bs-warning,    #ffc107) !important; }
.btn-outline-info       { color: var(--bs-info,       #0dcaf0) !important; }
.btn-outline-dark       { color: var(--bs-dark,       #212529) !important; }
.btn-outline-light      { color: var(--bs-light,      #f8f9fa) !important; }

/* Solid light: dark text so it's readable on a near-white bg. */
.btn-light              { color: var(--bs-dark,       #212529) !important; }

/* Bootstrap "btn-link" should look like a link, not white text on white. */
.btn-link               { color: var(--bs-link-color, #0d6efd) !important; }

/* ── HOVER / ACTIVE / FOCUS: invert to white on filled coloured bg ─ */
/* All coloured outlines flip text to white because Bootstrap fills the
 * bg with the variant colour on hover. */
.btn-outline-primary:hover,    .btn-outline-primary:focus,    .btn-outline-primary:active,
.btn-outline-secondary:hover,  .btn-outline-secondary:focus,  .btn-outline-secondary:active,
.btn-outline-success:hover,    .btn-outline-success:focus,    .btn-outline-success:active,
.btn-outline-danger:hover,     .btn-outline-danger:focus,     .btn-outline-danger:active,
.btn-outline-info:hover,       .btn-outline-info:focus,       .btn-outline-info:active,
.btn-outline-dark:hover,       .btn-outline-dark:focus,       .btn-outline-dark:active {
    color: #fff !important;
}

/* Light / outline-light: hover keeps a dark text since the bg is still
 * light-ish, otherwise it reads as ghost text. */
.btn-light:hover, .btn-light:focus, .btn-light:active,
.btn-outline-light:hover, .btn-outline-light:focus, .btn-outline-light:active {
    color: var(--bs-dark, #212529) !important;
}

/* btn-outline-warning fills with light yellow — dark text reads better. */
.btn-outline-warning:hover, .btn-outline-warning:focus, .btn-outline-warning:active {
    color: var(--bs-dark, #212529) !important;
}

/* btn-link on hover stays readable. */
.btn-link:hover, .btn-link:focus, .btn-link:active {
    color: var(--bs-link-hover-color, #0a58ca) !important;
}

/* ── DISABLED buttons: muted text always readable ─────────────────── */
.btn:disabled, .btn.disabled {
    color: var(--bs-secondary, #6c757d) !important;
    opacity: 0.65;
}
