html {
  font-size: 18px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Navigation pin/unpin styles */
/* When force-collapsed class is applied, always show hamburger menu */
.navbar.force-collapsed .navbar-toggler,
html.nav-force-collapsed .navbar .navbar-toggler {
  display: block !important;
}

.navbar.force-collapsed .navbar-collapse,
html.nav-force-collapsed .navbar .navbar-collapse {
  display: none !important;
}

.navbar.force-collapsed .navbar-collapse.show,
html.nav-force-collapsed .navbar .navbar-collapse.show {
  display: block !important;
}

/* Pin button styling */
#navPinToggleMobile,
#navPinToggleDesktop {
  font-size: 1rem;
  line-height: 1;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

#navPinToggleMobile:hover,
#navPinToggleDesktop:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0.25rem;
}

#navPinToggleMobile:focus,
#navPinToggleDesktop:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(37, 140, 251, 0.25);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Mobile: Prevent auto-zoom on input focus */
/* iOS Safari and other mobile browsers auto-zoom when input font-size < 16px */
@media (max-width: 768px) {
  input,
  select,
  textarea,
  .form-control,
  .form-control-sm,
  .form-select,
  .form-select-sm,
  .ck-editor__editable,
  .ck-content {
    font-size: 16px !important;
  }

  /* Make (BETA) badge 40% smaller on mobile */
  .beta-badge {
    font-size: 0.6em;
  }
}

/* Keyboard-navigable dropdowns: highlight the focused item the same way hover does */
.dropdown-menu .dropdown-item:focus {
  color: var(--bs-dropdown-link-hover-color);
  background-color: var(--bs-dropdown-link-hover-bg);
  outline: none;
}

/* Custom autocomplete dropdown — uses .autocomplete-dropdown/.autocomplete-option instead of
   Bootstrap's .dropdown-menu/.dropdown-item to avoid Bootstrap dropdown.js keyboard handler conflicts */
.autocomplete-dropdown {
  position: absolute;
  z-index: 1000;
  display: none;
  min-width: 100%;
  padding: 0.5rem 0;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.175);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.autocomplete-dropdown.show {
  display: block;
}
.autocomplete-option {
  display: block;
  width: 100%;
  padding: 0.25rem 1rem;
  clear: both;
  font-weight: 400;
  color: #212529;
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  cursor: pointer;
}
.autocomplete-option:hover,
.autocomplete-option:focus,
.autocomplete-option.active {
  color: #1e2125;
  background-color: #e9ecef;
  outline: none;
}
.autocomplete-option.text-muted {
  pointer-events: none;
  cursor: default;
}