/******************************************************************************
 * Bootstrap v5 fixes
 */

/* Links: only underline on hover (except navbar items) */
a, .navbar a:hover {
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Navigation bar: improve dropdown header appearance */
.navbar .dropdown-header {
  border-bottom: 1px solid #e9ecef;
  padding: 0.5rem 0.5rem 0.1rem 0.5rem;
}

/* Navigation bar: reduce left padding to align menu with header (OpenXPKI logo).
   We cannot add class "ps-lg-2" to the <div class="container-fluid"> that is
   auto-generated by <BsNavbar> ... so we manually apply "ps-lg-2" and "pe-lg-3": */
@media (min-width: 992px) {
  .navbar > .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 1rem !important;
  }
}

/* Forms: do not set green color for labels of "valid" checkboxes */
.was-validated .form-check-input:valid ~ .form-check-label {
  color: inherit;
}

/* Forms: set default blue, not green background color for "valid" checkboxes */
.form-check-input.is-valid:checked, .was-validated .form-check-input:valid:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Forms: more discreet colors for border and check mark in valid input fields */
.was-validated .form-control:valid:not([multiple]):not([size]), .was-validated .form-control:valid:not([multiple])[size="1"], .form-control.is-valid:not([multiple]):not([size]), .form-control.is-valid:not([multiple])[size="1"] {
  border-color: #5c8866;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23c8d6cb' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}
.was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] {
  border-color: #5c8866;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23c8d6cb' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-position: right 0.75rem center, center right 2.25rem;
  background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Forms: lighter placeholder color */
.form-control::placeholder {
  color: #aab4bc;
}

/* Tables: lighter color for thick border between head and body */
.table > :not(:first-child) {
  border-top-color: var(--bs-secondary);
}

/* Missing class for white-space: pre-wrap */
.text-prewrap {
  white-space: pre-wrap
}
