/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bs-body-bg: #f8fafc;
  --bs-body-color: #1f2933;
  --bs-primary: #3a6ea5;
  --bs-primary-rgb: 58, 110, 165;
  --bs-warning: #ffcf49;
  --bs-warning-rgb: 255, 207, 73;
  --bs-link-color: #2f5a87;
  --bs-link-hover-color: #24486a;
  --bs-border-color: #e2e8f0;
  --bs-focus-ring-color: rgba(58, 110, 165, 0.35);
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background-color: #0d6efd;
  color: #ffffff;
  z-index: 1000;
  border-radius: 0 0 0.25rem 0.25rem;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
}

.card-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.card-panel.panel-open {
  max-height: 2000px;
}

.agreement-editor-body {
  min-height: 320px;
}

.agreement-editor-body .tpl-var,
.agreement-editor-text .tpl-var {
  position: relative;
  transition: border-color 0.15s ease-in-out;
  border-bottom: 1px dashed transparent;
}

.agreement-editor-body.show-hints .tpl-var {
  border-bottom-color: var(--bs-primary);
}

.agreement-editor-body.show-hints .tpl-var::after {
  content: attr(data-key);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -0.25rem);
  background: rgba(15, 118, 255, 0.9);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease-in-out;
}

.agreement-editor-body.show-hints .tpl-var:hover::after {
  opacity: 1;
}

.field-tooltip-icon {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.field-tooltip-icon:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  border-radius: 50%;
}

.bookmark-preview__tooltip:focus {
  outline: none;
  border-radius: 0;
}

.template-preview-body .tpl-var {
  border-bottom: 1px dotted #6c757d;
  position: relative;
  cursor: help;
}

.template-preview-body .tpl-var::after {
  content: attr(data-key);
  position: absolute;
  left: 0;
  bottom: 100%;
  transform: translateY(-0.25rem);
  background: #fff;
  color: #495057;
  border: 1px solid #dee2e6;
  font-size: 0.75rem;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;
  z-index: 10;
}

.template-preview-body .tpl-var:hover::after {
  opacity: 1;
}

.template-variable-panel {
  position: sticky;
  top: 1rem;
}

.template-side-panel .template-variable-panel {
  position: static;
}

.template-version-history {
  position: sticky;
  top: 1rem;
}

.template-variable-panel .template-variable-list {
  max-height: 60vh;
  overflow-y: auto;
}

.templates-index__card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.templates-index__card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  border-color: rgba(13, 110, 253, 0.2);
}

.templates-index__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #0d6efd;
  flex-shrink: 0;
}

.templates-index__icon .bi {
  font-size: 1.25rem;
}

.template-form__actions {
  position: sticky;
  bottom: 0;
  background-color: #ffffff;
  border-top: 1px solid #dee2e6;
  padding-top: 0.75rem;
  z-index: 2;
}

.template-editor--ready [data-template-editor-target="input"] {
  display: none;
}

.agreement-preview.agreement-variable-hints--on .tpl-var {
  background-color: #fff200; // soft yellow highlight
  padding: 0 2px;            // tiny padding so the highlight doesn’t crash into text
  border-radius: 2px;
  cursor: help;
}

.ck-editor__editable[role="textbox"] {
  min-height: 680px;
}

/* Make form inputs and selects clearly visible everywhere */
.form-control,
.form-select {
  background-color: #ffffff !important;
  border: 1px solid #ced4da !important;
  color: #212529;
}

.form-control:focus,
.form-select:focus {
  background-color: #ffffff;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Limit edit assignment picker lists to ~5 visible rows. */
.edit-assignments__picker {
  max-height: calc(6 * var(--bs-body-line-height) * 1rem);
  overflow-y: auto;
  padding: 0;
}

.edit-assignments__picker .form-check {
  margin-bottom: 0.25rem;
}

.edit-assignments__picker .form-check-input {
  margin-top: 0.2rem;
}

.edit-assignments__researcher-menu {
  position: static;
  transform: none !important;
  float: none;
  margin-top: 0.35rem;
}

/* Force consistent select styling across browsers for single selects */
.form-select:not([multiple]):not([size]),
.form-select:not([multiple])[size="1"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: var(
    --bs-form-select-bg-img,
    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 5 6 6 6-6'/%3e%3c/svg%3e")
  ) !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
  padding-right: 2.25rem;
}

/* CKEditor alignment classes (used instead of inline styles) */
.tpl-align-left {
  text-align: left;
}

.tpl-align-center {
  text-align: center;
}

.tpl-align-right {
  text-align: right;
}

.tpl-align-justify {
  text-align: justify;
}

.overview-summary-card {
  font-size: 0.9rem;
}

.overview-summary-card .overview-stat {
  padding: 0.5rem 0.75rem;
  background-color: #fff;
}

.overview-summary-card .overview-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
}

.overview-summary-card .overview-stat-value.small {
  font-size: 0.95rem;
}

.overview-summary-card .overview-stat-label {
  font-size: 0.75rem;
  line-height: 1.25;
}

.bookmark-filter__control button {
  text-align: left;
}

.bookmark-filter__dropdown {
  max-height: 24rem;
  overflow-y: auto;
}

/* Overlay dropdown positioning is applied inline in MultiSelect to avoid CSS ordering issues. */

.bookmark-filter__options {
  max-height: 18rem;
  overflow-y: auto;
}

.bookmark-filter__dropdown-panel {
  width: clamp(12rem, 80vw, 18rem);
  max-width: 90vw;
}

.bookmark-filter-summary__layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.bookmark-filter-summary-stack {
  position: relative;
}

.bookmark-saved-filter-sets-popover {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 20;
  width: min(30rem, 100%);
  background-color: #ffffff;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.bookmark-saved-filter-sets-popover .list-group {
  max-height: min(24rem, 60vh);
  overflow-y: auto;
}

@media (min-width: 768px) {
  .bookmark-filter-summary__layout {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .bookmark-filter-summary__trailing {
    justify-self: end;
  }
}

.bookmark-filter__details > summary {
  list-style: none;
}

.bookmark-filter__details > summary::-webkit-details-marker {
  display: none;
}

.updates-export-modal__body {
  overflow: visible;
  max-height: min(78vh, 44rem);
  font-size: 0.9375rem;
  line-height: 1.35;
}

.updates-export-modal__body .form-label,
.updates-export-modal__body .form-check-label,
.updates-export-modal__body .btn,
.updates-export-modal__body .form-control {
  font-size: 0.9375rem;
}

.updates-export-modal__body .h6,
.updates-export-modal__body .fw-semibold.d-block {
  font-size: 0.95rem;
}

.updates-export-modal__body .small,
.updates-export-modal__body .form-text,
.updates-export-modal__footer .small {
  font-size: 0.78rem;
  line-height: 1.3;
}

.updates-export-modal__body .text-uppercase.small {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.updates-export-refine {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.updates-export-refine__panel {
  min-height: 0;
}

.updates-export-impact-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
}

.updates-export-impact-filter .h6 {
  white-space: nowrap;
}

.updates-export-impact-filter .form-switch {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-left: 0;
  min-height: 0;
}

.updates-export-impact-filter .form-check-input {
  float: none;
  margin: 0;
}

.updates-export-refine__toggle {
  width: 100%;
}

.updates-export-refine__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
}

.updates-export-refine__collapse {
  text-decoration: none;
}

.updates-export-refine__collapse:hover,
.updates-export-refine__collapse:focus {
  text-decoration: none;
}

.updates-export-date-field {
  width: min(100%, 11.5rem);
}

.updates-export-modal__footer {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
}

.updates-export-modal__summary {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
}

.updates-export-modal__actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.5rem;
  white-space: nowrap;
}

.updates-export-modal__footer .btn {
  --bs-btn-font-size: 0.875rem;
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
  background-color: var(--bs-primary);
  color: #ffffff;
}

/* Global dropdown theming to match Bookmark admin controls. */
.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--bs-primary);
  --bs-dropdown-link-active-color: #ffffff;
  --bs-dropdown-link-hover-bg: rgba(var(--bs-primary-rgb), 0.22);
  --bs-dropdown-link-hover-color: var(--bs-primary);
}

.btn-outline-secondary.dropdown-toggle {
  --bs-btn-focus-shadow-rgb: 108, 117, 125;
  --bs-btn-focus-border-color: #6c757d;
  --bs-btn-active-border-color: #6c757d;
  --bs-btn-active-bg: #ffffff;
  --bs-btn-active-color: inherit;
}

.bookmark-filter__option input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.bookmark-filter__option--select-all input[type="checkbox"] {
  margin-top: 0;
}

.bookmark-filter__option input[type="checkbox"]:focus:not(:focus-visible) {
  box-shadow: none;
}


.bookmark-preview__search {
  width: 16rem;
  max-width: 100%;
}

.bookmark-preview__toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e9ecef;
  background-color: #f8f9fa;
  border-radius: 0.75rem;
}

.bookmark-preview__search-row {
  margin-left: auto;
}

/* Inactive membership types should read as de-emphasized at a glance. */
.inactive-card {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

.inactive-card .card-header {
  background-color: #e2e8f0;
}

@media (min-width: 768px) {
  .membership-types__toolbar {
    flex-wrap: nowrap;
  }
}

@media (max-width: 767.98px) {
  .bookmark-preview__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bookmark-preview__search-row {
    margin-left: 0;
    width: 100%;
  }
}

.bookmark-preview__pager-link {
  display: inline-flex;
  align-items: center;
  color: var(--bs-secondary-color, #6c757d);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.2;
}

.bookmark-preview__pager-link:hover,
.bookmark-preview__pager-link:focus {
  color: var(--bs-body-color, #212529);
}

.bookmark-preview__pager-link--disabled {
  color: var(--bs-secondary-color, #6c757d);
  opacity: 0.55;
  text-decoration: none;
}

.bookmark-preview__pager-status {
  padding: 0;
  background-color: transparent;
  border: 0;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.2;
}

.bookmark-preview__savebar {
  padding: 0.75rem;
  border: 1px solid #e9ecef;
  background-color: #f8f9fa;
  border-radius: 0.75rem;
  flex-shrink: 0;
}

.bookmark-confirm-modal .modal-header,
.bookmark-confirm-modal .modal-footer {
  border: 0;
}

.bookmark-preview__value :where(p, ul, ol) {
  margin-bottom: 0.5rem;
}

.bookmark-preview__content {
  overflow-x: hidden;
}

.bookmark-preview__value-content {
  overflow-x: hidden;
}

.bookmark-preview__value-content--collapsed {
  max-height: calc(1.5em * 3);
  overflow: hidden;
}

.bookmark-preview__value-toggle {
  padding: 0;
  margin-top: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.bookmark-inline-action {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--bs-link-color);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
}

.bookmark-inline-action--muted {
  color: var(--bs-secondary-color);
  font-weight: 400;
}

.bookmark-inline-action:hover {
  color: var(--bs-link-hover-color);
}

.bookmark-inline-action:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.35);
  outline-offset: 2px;
  border-radius: 2px;
}

.bookmark-preview__content :where(p, ul, ol, div, span, td, th) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bookmark-preview__value :where(p, ul, ol):last-child {
  margin-bottom: 0;
}

.bookmark-preview__value a {
  word-break: break-word;
}

.bookmark-results__list {
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0;
  border-radius: 0;
}

.bookmark-results__pane {
  background-color: var(--bs-card-bg, #fff);
  position: relative;
  border-radius: var(--bs-card-border-radius, 0.375rem);
  overflow: hidden;
}

.bookmark-results__pane::after {
  content: "";
  position: absolute;
  inset: 0;
  border: var(--bs-card-border-width, 1px) solid #b8c1cc;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}

.bookmark-results__pane-header {
  padding: 1rem 1rem 0;
}

.bookmark-results__pane-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #dee2e6;
  background-color: var(--bs-card-bg, #fff);
}

.bookmark-results__pane-meta > .bookmark-results__pager-inline-wrap {
  flex: 1 1 100%;
}

.bookmark-results__empty-state {
  padding: 1rem;
}

.bookmark-results__pane-meta + .bookmark-results__list > :first-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.bookmark-results__list > :first-child {
  border-top-left-radius: calc(var(--bs-card-border-radius, 0.375rem) - var(--bs-card-border-width, 1px));
  border-top-right-radius: calc(var(--bs-card-border-radius, 0.375rem) - var(--bs-card-border-width, 1px));
}

.bookmark-results__list > :last-child {
  border-bottom-left-radius: calc(var(--bs-card-border-radius, 0.375rem) - var(--bs-card-border-width, 1px));
  border-bottom-right-radius: calc(var(--bs-card-border-radius, 0.375rem) - var(--bs-card-border-width, 1px));
}

.bookmark-results__list .text-muted {
  font-size: 0.875rem;
}

.bookmark-results__item {
  box-shadow: inset 0 1px 0 #dee2e6;
}

.bookmark-results__item--selected {
  box-shadow: inset 4px 0 0 var(--bs-primary), inset 0 1px 0 #dee2e6;
}

.bookmark-results__list .bookmark-results__item--alt {
  background-color: #f3f6f9;
}

.bookmark-results__list .list-group-item.bg-primary-subtle {
  background-color: var(--bs-primary-bg-subtle);
}

.bookmark-results__group {
  padding: 0.4rem 0.75rem;
  background-color: #eef1f4;
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  position: sticky;
  top: 0;
  z-index: 2;
}

.bookmark-results__pager-row {
  position: static;
  top: auto;
  z-index: 1;
}

.bookmark-results__group-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #495057;
}

.bookmark-results__subgroup {
  padding: 0.4rem 0.75rem 0.35rem 1.05rem;
  background-color: #f8f9fa;
  border-top: 1px solid #eef1f4;
}

.bookmark-results__subgroup-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6c757d;
}


.bookmark-results__pager {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  gap: 0.35rem 0 !important;
  font-size: 0.875rem;
}

.bookmark-results__pager--inline {
  width: 100%;
}

.bookmark-results__pager-slot {
  display: inline-flex;
  align-items: center;
}

.bookmark-results__pager-slot {
  justify-self: center;
}

.bookmark-results__pager-row {
  position: static;
  top: auto;
  z-index: 1;
  padding: 0.6rem 0.75rem;
  background-color: var(--bs-card-bg, #fff);
  border-top: 1px solid #dee2e6;
  border-bottom: 0;
}

.bookmark-results__pager-link {
  display: inline-flex;
  align-items: center;
  color: var(--bs-secondary-color, #6c757d);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  font-weight: 400;
  line-height: 1.2;
}

.bookmark-results__pager-link:hover,
.bookmark-results__pager-link:focus {
  color: var(--bs-body-color, #212529);
}

.bookmark-results__pager-link--disabled {
  color: var(--bs-secondary-color, #6c757d);
  opacity: 0.55;
  text-decoration: none;
}

.bookmark-results__pager-select {
  min-height: calc(1.5em + 0.35rem + 2px);
  padding-top: 0.175rem;
  padding-bottom: 0.175rem;
  padding-left: 0.5rem;
  padding-right: 1.75rem;
}

@media (max-width: 767.98px) {
  .bookmark-results__pager {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

.bookmark-results__pager-status {
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  font-weight: 600;
}

.bookmark-results__pager .text-muted,
.bookmark-results__pager .small {
  font-size: inherit;
}

.bookmark-results__header {
  display: grid;
  gap: 0.75rem;
  align-items: center;
}

.bookmark-results__export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .bookmark-results__header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bookmark-results__export-actions {
    justify-content: flex-end;
  }
}

@media (min-width: 992px) {
  .bookmark-results__list {
    padding-right: 0;
  }

  .bookmark-preview-pane {
    position: sticky;
    top: var(--app-header-height);
    align-self: flex-start;
  }

  .bookmark-preview__header {
    position: sticky;
    top: var(--app-header-height);
    z-index: 3;
    margin-bottom: 0;
    padding-bottom: 0;
    background-color: #fff;
  }

  .bookmark-preview__header > header {
    margin-bottom: 0;
    padding-top: 0.1rem;
  }
}

.bookmark-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.bookmark-edit-grid__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bookmark-entry-edit__container {
  /* Keep content from being covered by the fixed action bar. */
  padding-bottom: calc(clamp(6.5rem, 14vh, 10rem) + env(safe-area-inset-bottom, 0px));
}

.bookmark-entry-edit__actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1029;
  border-top: 1px solid var(--bs-border-color);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.bookmark-entry-edit__actionbar-inner {
  padding: 0.75rem 0;
}

.bookmark-entry-edit__status {
  font-size: 0.875rem;
  line-height: 1.3;
}

.bookmark-entry-edit__hint {
  font-size: 0.75rem;
  line-height: 1.35;
}

.bookmark-entry-edit__row--changed {
  background-color: rgba(var(--bs-primary-rgb), 0.05);
  border-left: 4px solid rgba(var(--bs-primary-rgb), 0.35);
}

.bookmark-entry-edit__row + .bookmark-entry-edit__row {
  border-top: 1px solid #e9ecef;
}

.bookmark-entry-edit__section {
  overflow: hidden;
}

.bookmark-entry-edit__revert {
  text-decoration: none;
  font-weight: 600;
}

.bookmark-entry-edit__revert:hover {
  text-decoration: underline;
}

.bookmark-entry-edit__edit-toggle {
  text-decoration: none;
  font-weight: 600;
}

.bookmark-entry-edit__edit-toggle:hover {
  text-decoration: underline;
}

.bookmark-entry-edit__value-preview {
  min-width: 0;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bookmark-entry-edit__summary-title {
  font-weight: 700;
}

.bookmark-entry-edit__summary-card {
  display: grid;
  gap: 0.5rem;
}

.bookmark-entry-edit__summary-label {
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
}

.bookmark-entry-edit__summary-help {
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.bookmark-entry-edit__summary-meta-grid {
  display: grid;
  row-gap: 0.5rem;
  column-gap: 0.5rem;
  margin-top: 0.125rem;
}

.bookmark-entry-edit__summary-meta-item {
  display: grid;
  gap: 0.125rem;
  align-content: start;
}

.bookmark-entry-edit__choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.bookmark-entry-edit__choice,
.bookmark-entry-edit__check-option {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  color: var(--bs-body-color);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.3;
}

.bookmark-entry-edit__choice .form-check-input,
.bookmark-entry-edit__check-option .form-check-input {
  flex: 0 0 auto;
  margin: 0;
}

.bookmark-entry-edit__check-option {
  max-width: 100%;
}

@media (min-width: 768px) {
  .bookmark-entry-edit__summary-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.875rem;
  }
}

@media (min-width: 992px) {
  .bookmark-entry-edit__summary-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1rem;
  }

  .bookmark-entry-edit__summary-meta-item--impact {
    transform: translateX(0.5rem);
  }
}

.bookmark-entry-edit__changes {
  position: relative;
}

.bookmark-entry-edit__changes-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  width: min(36rem, 92vw);
  max-height: min(50vh, 22rem);
  overflow: auto;
  z-index: 1;
}

@media (max-width: 991.98px) {
  .bookmark-entry-edit__changes-panel {
    left: 0;
    right: 0;
    width: auto;
  }
}

#bookmark-results-anchor {
  scroll-margin-top: 160px;
}

#nursing-results-anchor {
  scroll-margin-top: 160px;
}

.bookmark-search-hero {
  background: linear-gradient(
    135deg,
    rgba(var(--bs-primary-rgb), 0.1) 0%,
    rgba(var(--bs-primary-rgb), 0.04) 55%,
    rgba(255, 255, 255, 0.98) 100%
  );
  border: 1px solid rgba(var(--bs-primary-rgb), 0.16) !important;
  box-shadow: none !important;
}

.bookmark-search-hero__eyebrow {
  color: rgba(var(--bs-primary-rgb), 0.85);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bookmark-search-hero__copy {
  width: 100%;
}

.bookmark-search-hero__headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.bookmark-search-hero__text {
  width: 100%;
}

.bookmark-search-hero__description {
  max-width: 48rem;
}

.bookmark-search-hero__actions {
  --bookmark-search-action-width: 13.5rem;
  display: grid;
  gap: 0.5rem;
  width: min(100%, var(--bookmark-search-action-width));
  flex-shrink: 0;
}

.bookmark-search-hero__actions > * {
  min-width: 0;
}

.bookmark-search-btn.btn {
  min-height: 48px;
  padding-inline: 1.5rem;
  font-weight: 700;
  box-shadow: 0 0.5rem 1rem rgba(var(--bs-primary-rgb), 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.bookmark-search-btn--secondary.btn {
  min-height: 48px;
  padding-inline: 1.5rem;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.92);
  border-color: rgba(var(--bs-primary-rgb), 0.24);
  color: var(--bs-primary);
  box-shadow: none;
}

.bookmark-search-hero__actions .bookmark-filter__details {
  width: 100%;
}

.bookmark-search-hero__actions .bookmark-filter__details > summary.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.bookmark-search-hero__actions .bookmark-filter__dropdown-panel {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.bookmark-search-btn.btn.btn-primary:hover,
.bookmark-search-btn.btn.btn-primary:active {
  color: var(--bs-white) !important;
  border-color: var(--bs-primary);
  background-color: var(--bs-primary);
  transform: translateY(-1px);
}

.bookmark-search-btn--secondary.btn:hover,
.bookmark-search-btn--secondary.btn:active {
  color: var(--bs-primary);
  border-color: rgba(var(--bs-primary-rgb), 0.42);
  background-color: #ffffff;
  transform: translateY(-1px);
}

.bookmark-search-btn.btn:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.35),
    0 0.5rem 1rem rgba(var(--bs-primary-rgb), 0.22);
}

@media (min-width: 576px) {
  .bookmark-search-hero__actions {
    width: fit-content;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(var(--bookmark-search-action-width), var(--bookmark-search-action-width)));
  }

  .bookmark-search-hero__actions--single {
    grid-template-columns: minmax(var(--bookmark-search-action-width), var(--bookmark-search-action-width));
  }
}

@media (min-width: 992px) {
  .bookmark-search-hero__headline {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bookmark-search-btn.btn {
    transition: none;
  }

  .bookmark-search-btn.btn.btn-primary:hover,
  .bookmark-search-btn.btn.btn-primary:active,
  .bookmark-search-btn--secondary.btn:hover,
  .bookmark-search-btn--secondary.btn:active {
    transform: none;
  }
}

/* Pipelines: focus layout (Fizzy-like collapsed rails) */
.pipeline-focus-board {
  --pipeline-focus-column-width: 520px;
  --pipeline-focus-rail-width: 44px;
  --pipeline-drawer-max-width: 460px;

  display: grid;
  gap: 0.75rem;
  align-items: stretch;
  grid-template-columns: 1fr var(--pipeline-focus-column-width) 1fr;
  overflow-x: auto;
  padding-bottom: 0.75rem;
}

.pipeline-search-input::-webkit-search-cancel-button,
.pipeline-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.pipeline-focus-board[data-in-progress-hidden="true"] {
  grid-template-columns: auto var(--pipeline-focus-rail-width) auto;
  column-gap: 0.75rem;
}

@media (min-width: 992px) {
  .pipeline-focus-board[data-in-progress-hidden="true"] {
    max-width: calc(100% - var(--pipeline-drawer-max-width));
  }

  .pipeline-focus-board[data-drawer-shift="true"] {
    max-width: calc(100% - var(--pipeline-drawer-max-width));
  }
}

.pipeline-focus-side {
  align-items: stretch;
  display: flex;
  gap: 0.75rem;
}

.pipeline-focus-side--left {
  justify-content: flex-end;
}

.pipeline-focus-side--right {
  justify-content: flex-start;
}

.pipeline-focus-center {
  display: flex;
  justify-content: center;
}

.pipeline-focus-column {
  flex: 0 0 auto;
  display: flex;
}

.pipeline-focus-column > .card {
  flex: 1;
}

.pipeline-focus-column--open {
  width: min(var(--pipeline-focus-column-width), 92vw);
}

.pipeline-focus-column--rail {
  width: var(--pipeline-focus-rail-width);
}

.pipeline-focus-column--rail > .card {
  background: transparent;
  border: 0;
  box-shadow: none !important;
}

.pipeline-focus-column--rail > .card .card-header,
.pipeline-focus-column--rail > .card .card-body {
  display: none;
}

.pipeline-focus-rail {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  padding: 0.25rem 0;
  text-align: center;
  width: 100%;
}

.pipeline-focus-rail:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.pipeline-focus-rail:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.pipeline-focus-rail[disabled] {
  cursor: default;
  opacity: 0.7;
}

.pipeline-focus-rail[disabled]:hover {
  background-color: transparent;
}

.pipeline-focus-rail__count {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  color: #111827;
}

.pipeline-focus-rail__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.85rem;
  color: #475569;
  user-select: none;
}

.pipeline-focus-rail__line {
  flex: 1 1 auto;
  width: 1px;
  background: var(--bs-border-color);
  opacity: 0.8;
  margin-top: 0.5rem;
}

/* Pipelines: de-emphasize non-active cards when drawer open (without changing active card surface) */
[data-pipeline-card-active="true"] {
  background-color: #ffffff;
  border-color: var(--bs-border-color);
  box-shadow: var(--bs-box-shadow-sm);
  opacity: 1;
  filter: none;
}

[data-pipeline-card-dimmed="true"] {
  position: relative;
}

[data-pipeline-card-dimmed="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(1px);
  pointer-events: none;
  transition: opacity 160ms ease;
}
