/*
 * Badge colours for the class names this application writes.
 *
 * The layout loads Bootstrap 5.1.3. Bootstrap 5 removed the contextual badge
 * classes - badge-success, badge-secondary and the rest became bg-success,
 * bg-secondary - but the templates were written against Bootstrap 4 and still
 * use the old names in 115 places, plus a dozen more built at render time as
 * class="badge badge-<?= $statusClass ?>".
 *
 * A bare .badge in Bootstrap 5 sets color: #fff and no background, so every one
 * of those rendered white text on a white card: written, and unreadable. It was
 * found on the password reset screen, where the Enabled row looked empty.
 *
 * Some pages had noticed and defined the classes again in their own <style>
 * block - .badge-success appears in 90 of them - which is why the fault was
 * patchy rather than total. Those blocks are in the body, so they come after
 * this file and still win; this only fills in the pages that have none.
 *
 * The values are Bootstrap 4.6's own, so the result is what the markup was
 * written for rather than a new palette.
 *
 * Renaming all 378 tokens to bg-* would be the other way, and a worse one: it
 * is a few hundred edits across a hundred files, it cannot be checked by
 * looking, and it would also have to rewrite the local <style> blocks that
 * currently make those pages correct. tests/badge_classes.php holds this file
 * to every contextual badge class the templates actually use.
 */

.badge-primary   { color: #fff;     background-color: #007bff; }
.badge-secondary { color: #fff;     background-color: #6c757d; }
.badge-success   { color: #fff;     background-color: #28a745; }
.badge-danger    { color: #fff;     background-color: #dc3545; }
.badge-warning   { color: #212529;  background-color: #ffc107; }
.badge-info      { color: #fff;     background-color: #17a2b8; }
.badge-light     { color: #212529;  background-color: #f8f9fa; }
.badge-dark      { color: #fff;     background-color: #343a40; }

/* Bootstrap 4's pill shape, which became rounded-pill. */
.badge-pill      { border-radius: 10rem; }

/* A link wearing a badge keeps its colour on hover, as it did in Bootstrap 4. */
a.badge-primary:hover,   a.badge-primary:focus   { background-color: #0062cc; }
a.badge-secondary:hover, a.badge-secondary:focus { background-color: #545b62; }
a.badge-success:hover,   a.badge-success:focus   { background-color: #1e7e34; }
a.badge-danger:hover,    a.badge-danger:focus    { background-color: #bd2130; }
a.badge-warning:hover,   a.badge-warning:focus   { background-color: #d39e00; }
a.badge-info:hover,      a.badge-info:focus      { background-color: #117a8b; }
