/*
 * Bootstrap 5.3 compatibility (2026-11-27).
 *
 * The app moved from Bootstrap 5.2.2 to 5.3.9. 5.3 changed a few default colors
 * (it introduced color modes, and with them new "emphasis", "secondary" and
 * "tertiary" variables). The rules below put those back to what 5.2.2 drew, so
 * the staff screens look the same as before the upgrade. Each rule says what it
 * restores; nothing here adds a new look. Loaded right after bootstrap.min.css
 * (layouts/application and gym_checkins/monitor). This is first-party code: it is
 * not a vendored file and is not in config/vendored_assets.yml.
 */

:root {
  /* .text-muted, .form-text, placeholders, .dropdown-header, .card-subtitle: 5.2.2 drew #6c757d;
     5.3 draws rgba(33, 37, 41, 0.75). */
  --bs-secondary-color: #6c757d;
  --bs-secondary-color-rgb: 108, 117, 125;
  /* Dropdown item and pagination hover, .input-group-text, a hovered list-group action item: 5.2.2 used #e9ecef,
     5.3 reads --bs-tertiary-bg (#f8f9fa, lighter). */
  --bs-tertiary-bg: #e9ecef;
  --bs-tertiary-bg-rgb: 233, 236, 239;
}

/* Table text: 5.2.2 drew the body color (#212529); 5.3 draws --bs-emphasis-color, pure black.
   Cell background: 5.2.2 left it transparent; 5.3 paints --bs-body-bg (white), which would show as white
   cells on a table placed on a tinted surface (an alert, a bg-light box). */
.table {
  --bs-table-color: var(--bs-body-color);
  --bs-table-bg: transparent;
  --bs-table-striped-color: var(--bs-body-color);
  --bs-table-active-color: var(--bs-body-color);
  --bs-table-hover-color: var(--bs-body-color);
}

/* Unchecked checkbox and radio outline: 5.2.2 drew rgba(0, 0, 0, 0.25); 5.3 draws the pale
   --bs-border-color (#dee2e6), which is hard to see on a white page. Set as the variable (not as
   border-color) so Bootstrap's own :checked, :focus (blue) and .is-invalid (red) borders still win. */
.form-check-input {
  --bs-border-color: rgba(0, 0, 0, 0.25);
}

/* Text boxes, selects and the label box of an input group: 5.2.2 drew a #ced4da outline;
   5.3 draws the paler --bs-border-color (#dee2e6). (Only these three set the variable, so tables,
   cards and list groups keep their #dee2e6 as before.) */
.form-control,
.form-select,
.input-group-text {
  --bs-border-color: #ced4da;
}

/* A disabled "Previous"/"Next" in a table's page bar: 5.2.2 left it white; 5.3 fills it gray. */
.pagination {
  --bs-pagination-disabled-bg: var(--bs-body-bg);
}

/* The active tab's text (Billing Inbox "Open", the report tabs): 5.2.2 drew #495057; 5.3 draws black. */
.nav-tabs {
  --bs-nav-tabs-link-active-color: #495057;
}

/* A clickable list-group row (the workout log lists): 5.2.2 drew #495057 text, #f8f9fa on hover;
   5.3 draws gray text, black on hover and a darker hover fill. */
.list-group {
  --bs-list-group-action-color: #495057;
  --bs-list-group-action-hover-color: #495057;
  --bs-list-group-action-hover-bg: #f8f9fa;
}

/* Alerts: 5.2.2 drew each color's own text, link and border shades; 5.3 draws darker "emphasis" text
   and links and a slightly deeper border (the backgrounds are the same). Used by about 130 messages. */
.alert-secondary { --bs-alert-color: #41464b; --bs-alert-border-color: #d3d6d8; --bs-alert-link-color: #34383c; }
.alert-success   { --bs-alert-color: #0f5132; --bs-alert-border-color: #badbcc; --bs-alert-link-color: #0c4128; }
.alert-info      { --bs-alert-color: #055160; --bs-alert-border-color: #b6effb; --bs-alert-link-color: #04414d; }
.alert-warning   { --bs-alert-color: #664d03; --bs-alert-border-color: #ffecb5; --bs-alert-link-color: #523e02; }
.alert-danger    { --bs-alert-color: #842029; --bs-alert-border-color: #f5c2c7; --bs-alert-link-color: #6a1a21; }
