:root {
  --bs-nav-link-font-size: 1rem;
  --bs-list-group-item-padding-x: 0.8rem;
  --bs-list-group-item-padding-y: 0.1rem;

  --dt-row-stripe: 160, 160, 160;

  --font-size-smaller: 0.8rem;
  --font-size-smallest: 0.65rem;
}

.navbar {
  --bs-navbar-padding-y: 0;
}

.navbar-brand {
  --bs-navbar-brand-font-size: 1rem;
  --bs-navbar-brand-margin-end: 0.5rem;
  padding-bottom: 0;
}

.dropdown-menu {
  --bs-dropdown-item-padding-x: 0.5rem;
  --bs-dropdown-item-padding-y: 0.1rem;
}

.accordion {
  --bs-accordion-btn-padding-x: 1.0rem;
  --bs-accordion-btn-padding-y: 0.5rem;
  --bs-accordion-body-padding-y: 0.5rem;
}

.card {
  --bs-card-spacer-x: 0.5rem;
  --bs-card-spacer-y: 0;
  --bs-card-cap-padding-x: 0.7rem;
  --bs-card-cap-padding-y: 0.2rem;
  --bs-card-cap-bg: rgba(var(--bs-body-color-rgb), 0.09);
  --bs-card-border-color: var(--bs-border-color);
}

.card-footer {
  --bs-card-cap-bg: rgba(var(--bs-body-color-rgb), 0.01);
}

.input-group-text {
  background-color: rgba(var(--bs-body-color-rgb), 0.09);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
}

.table {
  font-size: var(--font-size-smaller);
  --bs-table-color: var(--bs-body-color);
  --bs-table-striped-color: var(--bs-body-color);
}

.btn-close {
  font-size: var(--font-size-smallest);
}

.btn-sm {
  font-size: var(--font-size-smaller);
  border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
}

.btn-xs {
  font-size: var(--font-size-smaller);
  --bs-btn-padding-y: 0.1rem;
  --bs-btn-padding-x: 0.3rem;
}

.btn-xs {
  font-size: var(--font-size-smaller);
  border: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
}

.text-smaller {
  font-size: var(--font-size-smaller);
}

.text-size-normal {
  font-size: 1rem !important;
}

.form-control-static {
  --bs-border-width: 0;
}

.short-input {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/*.table-hover > tbody > tr:hover {*/
/*  background-color: #FFFF00;*/
/*}*/

.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > thead > tr > th {
  padding: 0.3rem;
}

.footer-hr {
  margin: 0;
}

.footer-text {
  font-size: var(--font-size-smaller);
}

.nonprod-warning {
  background-color: #dc3545;
  color: #ffffff;
  font-size: 1rem;
}

.flex-input-container {
  display: flex;
}

.flex-input-container > label {
  margin: 0.3rem;
}

.flex-input-container > input {
  flex: 2;
}

.list-group-small > .list-group-item {
  padding: 0.2rem 0.3rem;
  font-size: var(--font-size-smaller);
}

/* Attached-people rows on an incident: keep the involvement field right next to
   the name rather than sprawling across the row (it used to inherit flex:2 from
   .flex-input-container > input). The name sits at natural width; the involvement
   input follows it (bounded), and its auto right-margin absorbs the free space so
   the trailing controls (access checkbox / badge / remove) stay at the far right.
   The row wraps on narrow screens rather than overflowing. */
.incident-person-item {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.incident-person-item > .person-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.incident-person-item > .involvement-input {
  flex: 0 1 12rem;
  max-width: 12rem;
  margin-right: auto;
}

.auto-width {
  width: auto;
  display: inline;
}

.journal_entry_system {
  font-size: var(--font-size-smaller);
  filter: opacity(75%);
}

.journal_entry_system > .journal_entry_text {
  margin: 0 0 0 0.5rem;
}

.journal_entry_stricken {
  font-size: var(--font-size-smaller);
  filter: opacity(75%);
  text-decoration: line-through;
}

.journal_entry_text {
  font-size: var(--font-size-smaller);
}

/* The changed value inside a rendered Changes History (system) entry line. */
.journal_change_value {
  font-weight: 600;
}

/* An @mention inside a rendered journal entry (plan 81). Styled, not yet linked
   (there's no person view to link to). */
.journal-mention {
  font-weight: 600;
  color: var(--bs-link-color);
}

.journal_entry_metadata {
  font-size: var(--font-size-smallest);
  font-weight: bold;
  text-decoration: underline;
  filter: opacity(75%);
  margin: 0.9rem 0 0 0;
}

.form-control {
  font-size: var(--font-size-smaller);
}

.control-label {
  font-weight: 700;
  font-size: var(--font-size-smaller);
}

.control-follow-text {
  font-size: var(--font-size-smaller);
}

.search-box {
  font-size: var(--font-size-smaller);
}

.dt-info {
  font-size: var(--font-size-smaller);
}

a {
  text-decoration: none;
}

h1 {
  margin-top: 0.8rem;
  font-size: 1.8rem;
}

/*
 * Below is a trick to hide the remove buttons (.remove-badge) from list
 * groups except when hovering, but only on non-touch devices.
 */

.no-touch .remove-badge {
  display: none;
}

.no-touch .list-group-item:hover .remove-badge {
  display: inline-block;
}
.no-touch .journal_entry:hover .remove-badge {
  display: inline-block;
}

/* Disable on touch devices if editing is disabled. */
.no-edit .remove-badge {
  display: none;
}

/* Override hover behavior if editing is disabled. */
.no-edit .list-group-item:hover .remove-badge {
  display: none;
}
.no-edit .journal_entry:hover .remove-badge {
  display: none;
}

.no-edit .new_incident {
  display: none;
}

.no-edit .new_field_report {
  display: none;
}

#journal_entry_well > .panel {
  margin-bottom: 0.5rem;
}

#journal_entry_add {
  resize: vertical;
  min-height: 8rem;
  field-sizing: content;
}

.item-hidden > .badge-visible {
  display: none;
}

.item-visible > .badge-hidden {
  display: none;
}

.badge-visible {
  float: right !important;
}

.badge-hidden {
  float: right !important;
}

/* The three independent journal view toggles (incident/report/visit pages) each
   add one of these classes to #journal_entries to hide that category. */
.hide-history .journal_entry_system {
  display: none;
}

.hide-stricken .journal_entry_stricken {
  display: none;
}

.hide-reports .journal_entry_from_report {
  display: none;
}

.bi {
  width: 1em;
  height: 1em;
  vertical-align: -.125em;
  fill: currentcolor
}

.logo-icon {
  width: auto;
  height: 1.8rem;
  object-fit: contain;
}

/* The OCF wordmark is white-on-transparent, so it reads on a dark navbar but would
   vanish on the light theme's navbar. Invert it in light mode so it shows as dark,
   mirroring the previous currentColor-driven behavior. */
[data-bs-theme="light"] .logo-icon {
  filter: invert(1);
}

@media print {
  .no-print {
    display: none;
  }

  /*!* The below tweaks make the print version have multiple columns, like the desktop >768 px version. *!*/
  /*.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {*/
  /*  float: left;*/
  /*}*/
  /*.col-sm-12 {*/
  /*  width: 100%;*/
  /*}*/
  /*.col-sm-11 {*/
  /*  width: 91.67%;*/
  /*}*/
  /*.col-sm-10 {*/
  /*  width: 83.33%;*/
  /*}*/
  /*.col-sm-9 {*/
  /*  width: 75%;*/
  /*}*/
  /*.col-sm-8 {*/
  /*  width: 66.67%;*/
  /*}*/
  /*.col-sm-7 {*/
  /*  width: 58.33%;*/
  /*}*/
  /*.col-sm-6 {*/
  /*  width: 50%;*/
  /*}*/
  /*.col-sm-5 {*/
  /*  width: 41.67%;*/
  /*}*/
  /*.col-sm-4 {*/
  /*  width: 33.33%;*/
  /*}*/
  /*.col-sm-3 {*/
  /*  width: 25%;*/
  /*}*/
  /*.col-sm-2 {*/
  /*  width: 16.67%;*/
  /*}*/
  /*.col-sm-1 {*/
  /*  width: 8.33%;*/
  /*}*/

  /* don't print the full name under the abbreviation */
  abbr[title]:after {
    content: "";
  }
}

.hidden {
  display: none !important;
}

/* Mobile navigation (below the navbar's `sm` expand breakpoint, where it
   collapses into the hamburger menu). The desktop horizontal bar stacks into a
   single vertical list, and each dropdown — the event picker, theme,
   notifications, and user menu — expands *inline* (Bootstrap positions
   `.navbar-nav .dropdown-menu` statically here). With the default popover chrome
   those expanded items float at the same indent as the top-level links, so the
   menu hierarchy reads flat and confusing. Strip the popover chrome and indent
   each open menu behind a left rule so its items clearly nest under their
   toggle, and give the sections a little separation and tap room. */
@media (max-width: 575.98px) {
  #navbarSupportedContent .nav-link {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  #navbarSupportedContent .dropdown-menu {
    margin: 0 0 0.25rem 0.75rem;
    padding-top: 0;
    padding-bottom: 0;
    border: 0;
    border-left: 2px solid var(--bs-border-color);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  /* Visually separate the per-event links from the account cluster (theme,
     notifications, user menu) that follows them in the stacked list. */
  #navbarSupportedContent > ul.navbar-nav.me-auto {
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
    margin-bottom: 0.25rem;
  }
}

.dropdown-item-checkable {
  padding: var(--bs-dropdown-item-padding-y) 1.5rem;
}

.dropdown-item-checked::before {
  position: absolute;
  left: .4rem;
  content: '✓';
  font-weight: 600;
}

#queue_table>tbody>tr {
  cursor: pointer;
}

#field_reports_table>tbody>tr {
  cursor: pointer;
}

#visits_table>tbody>tr {
  cursor: pointer;
}

#places_table>tbody>tr {
  cursor: pointer;
}

.show-pointer {
  cursor: pointer;
}

.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 1000;
  top: 40%;
  left: 0px;
  /*opacity: 0.5;*/
  /*filter: alpha(opacity=50);*/
}

.white-space-pre-wrap {
  white-space: pre-wrap !important;
}

.mw-4rem {
  min-width: 4rem !important;
}

.place-dl > dd {
  padding-left: 1rem;
}

.hover-placeholder::placeholder {
  opacity: 0;
  transition: opacity 0.05s ease;
}

.hover-placeholder:hover::placeholder {
  opacity: 1;
}

/* Dashboard refresh highlight: a brief ring pulse on a card whose data just
   changed, so the eye is drawn to what moved instead of the whole page
   repainting. The semi-transparent ring reads in both light and dark themes. */
@keyframes glow-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
  20% {
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.55);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

.glow-changed {
  animation: glow-pulse 1.6s ease-out;
}

/* People roster (slice 53c): the per-row Role badge and ⋯ actions menu are
   Bootstrap dropdowns living inside the table's `.table-responsive` wrapper,
   whose `overflow-x: auto` would otherwise clip the open menu. The menus are
   short and the People table is narrow, so letting this wrapper overflow
   visibly keeps the dropdowns usable at every width without a real downside. */
#people .table-responsive {
  overflow: visible;
}

/* Cap the People roster's width: the page is a full-width container, but the
   roster has only a handful of columns, so on a wide screen it stretches into a
   sea of blank space that makes rows hard to scan across. Capping the card keeps
   it readable on desktops; on narrower screens the cap exceeds the viewport, so
   it's a no-op and the table stays full-width. */
#people .card {
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
}
