:root {
  --navbar-height: 49px;
}

/* Header height (49px) plus the banner height; a literal because gem_anchor_controller.js and gem_filter_controller.js parseFloat the computed value. */
html:has(.impersonation-banner) {
  --navbar-height: 81px;
}

.impersonation-banner {
  width: 100%;
  height: 32px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .impersonation-banner {
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }
}

.sticky-table-header th {
  position: sticky;
  top: var(--gem-table-sticky-top, var(--navbar-height));
  z-index: 1;
  background-color: var(--bs-body-bg);
}

.sticky-filter-bar {
  position: sticky;
  top: var(--navbar-height);
  z-index: 2;
  background-color: var(--bs-body-bg);
}

.collapse-toggle[aria-expanded="false"] .fa-chevron-down {
  transform: rotate(-90deg);
}

.ralph-plan-body {
  max-height: 300px;
  overflow-y: auto;
}

.chart-frame-400 {
  height: 400px;
}

.libyear-changes-frame {
  display: block;
}

.libyear-changes-frame[busy] > * {
  display: none;
}

.libyear-changes-frame[busy]::before {
  content: "";
  display: block;
  height: 8rem;
  margin-bottom: 1rem;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-body-bg);
  background-image:
    linear-gradient(var(--bs-secondary-bg), var(--bs-secondary-bg)),
    linear-gradient(var(--bs-secondary-bg), var(--bs-secondary-bg)),
    linear-gradient(var(--bs-secondary-bg), var(--bs-secondary-bg));
  background-repeat: no-repeat;
  background-size: 40% 1rem, 80% 1rem, 60% 1rem;
  background-position: 1rem 1rem, 1rem 3.5rem, 1rem 6rem;
  animation: libyear-changes-pulse 1.5s ease-in-out infinite;
}

@keyframes libyear-changes-pulse {
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .libyear-changes-frame[busy]::before {
    animation: none;
  }
}

.libyear-cause-bar {
  display: block;
  width: 100%;
  height: auto;
}

.libyear-cause-axis {
  stroke: var(--bs-secondary-color);
  stroke-width: 0.5;
}

.libyear-cause-left {
  fill: var(--bs-success);
  background-color: var(--bs-success);
}

.libyear-cause-right {
  fill: var(--bs-danger);
  background-color: var(--bs-danger);
}

.libyear-cause-tint {
  opacity: 0.55;
}

.libyear-cause-zero {
  background-color: var(--bs-secondary-bg);
  border: var(--bs-border-width) solid var(--bs-border-color);
}

.libyear-cause-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.125rem;
}

.libyear-selection-hint {
  border: var(--bs-border-width) dashed var(--bs-border-color);
}

.libyear-chart-selectable {
  touch-action: pan-y;
  user-select: none;
  cursor: crosshair;
}

.col-width-66 {
  width: 66%;
}
.col-width-34 {
  width: 34%;
}

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

.profile-form {
  max-width: 600px;
}

.nav-avatar-btn {
  background: none;
  border: none;
  padding: 0;
}

.favorite-star-form {
  display: inline-block;
}

.automation-chip-form {
  display: inline-block;
}

.favorite-star-btn {
  display: inline-block;
  border: none;
  background: transparent;
  padding: 0.35rem;
  border-radius: 50%;
  cursor: pointer;
}

.favorite-star-btn:hover,
.favorite-star-btn:focus-visible {
  background-color: rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .favorite-star-btn:hover,
[data-bs-theme="dark"] .favorite-star-btn:focus-visible {
  background-color: rgba(255, 255, 255, 0.12);
}

.header-user-image {
  width: 32px;
  height: 32px;
}

.header-user-initials {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bs-primary);
  color: #fff;
}

.cursor-pointer {
  cursor: pointer;
}

.required-by-more {
  list-style-position: inside;
}

.sort-indicator {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.px-md-responsive {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 767.98px) {
  .px-md-responsive {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 767.98px) {
  .modal-body-compact-x {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

.app-dialog {
  --bs-modal-width: 500px;
  --bs-modal-padding: 1rem;
  --bs-modal-margin: 0.5rem;
  --bs-modal-bg: var(--bs-body-bg);
  --bs-modal-border-color: var(--bs-border-color-translucent);
  --bs-modal-border-width: var(--bs-border-width);
  --bs-modal-border-radius: var(--bs-border-radius-lg);
  --bs-modal-box-shadow: var(--bs-box-shadow-sm);
  --bs-modal-inner-border-radius: calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));
  --bs-modal-header-padding-x: 1rem;
  --bs-modal-header-padding-y: 1rem;
  --bs-modal-header-padding: 1rem 1rem;
  --bs-modal-header-border-color: var(--bs-border-color);
  --bs-modal-header-border-width: var(--bs-border-width);
  --bs-modal-title-line-height: 1.5;
  --bs-modal-footer-gap: 0.5rem;
  --bs-modal-footer-border-color: var(--bs-border-color);
  --bs-modal-footer-border-width: var(--bs-border-width);
  width: var(--bs-modal-width);
  max-width: calc(100% - 2 * var(--bs-modal-margin));
  margin: var(--bs-modal-margin) auto auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bs-body-color);
}

@media (min-width: 576px) {
  .app-dialog {
    --bs-modal-margin: 1.75rem;
    --bs-modal-box-shadow: var(--bs-box-shadow);
  }
}

/* ::backdrop inherits only from its originating element, so it takes literal values rather than Bootstrap's backdrop variables. */
.app-dialog::backdrop {
  background-color: #000;
  opacity: 0.5;
}

.app-dialog-card-detail {
  max-height: calc(100% - 2 * var(--bs-modal-margin));
}

/* A percentage max-height on .modal-content does not resolve against the dialog's auto height; as a flex item it shrinks to the dialog's max-height instead. [open] keeps the closed dialog at display: none. */
.app-dialog-card-detail[open] {
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .app-dialog-card-detail {
    --bs-modal-width: 800px;
  }
}

@media (min-width: 1200px) {
  .app-dialog-card-detail {
    --bs-modal-width: 1140px;
  }
}

.app-dialog-card-detail .modal-content {
  overflow: hidden;
}

.app-dialog-card-detail .modal-body {
  overflow-y: auto;
}

@media (max-width: 767.98px) {
  .app-dialog-card-detail {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
  }

  .app-dialog-card-detail .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0;
  }
}

html {
  scrollbar-gutter: stable;
}

html:has(dialog:modal) {
  overflow: hidden;
}

.mobile-nav-back-link {
  max-width: 160px;
}

.flash-panel {
  position: fixed;
  top: var(--navbar-height);
  right: 1rem;
  z-index: 1035;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 350px;
}

/* Flash alert countdown progress bar: track + fill, both derived from currentColor.
   The track is a ::before pseudo-element (not a parent of the fill) so its low
   opacity doesn't get composited into the fill, which must stay at full opacity. */
.flash-alert {
  position: relative;
}

.app-dialog > .flash-alert {
  margin-bottom: 0.5rem;
}

.flash-alert .flash-alert-progress {
  position: absolute;
  bottom: 1px;
  left: 1px;
  right: 1px;
  height: 4px;
  overflow: hidden;
  border-radius: 0 0 var(--bs-alert-border-radius) var(--bs-alert-border-radius);
}

.flash-alert .flash-alert-progress::before {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  background-color: currentColor;
  opacity: 0.25;
}

.flash-alert .flash-alert-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: currentColor;
  transition-property: width;
  transition-timing-function: linear;
}


@media (min-width: 992px) {
  .app-form-sidebar {
    position: sticky;
    top: var(--navbar-height);
    max-height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
  }
}

.summary-note {
  display: none;
}

.form-summary .summary-on {
  display: none;
}

.app-form-row:has(#app_gem_upgrades_enabled:checked) .summary-gem-upgrades .summary-on,
.app-form-row:has(#app_package_upgrades_enabled:checked) .summary-js-package-upgrades .summary-on,
.app-form-row:has(#app_ruby_upgrade_enabled:checked) .summary-ruby-upgrades .summary-on,
.app-form-row:has(#app_board_processing_enabled:checked) .summary-board-processing .summary-on,
.app-form-row:has(#app_vulnerability_alerts_enabled:checked) .summary-vulnerability-alerts .summary-on {
  display: inline;
}

.app-form-row:has(#app_gem_upgrades_enabled:checked) .summary-gem-upgrades .summary-off,
.app-form-row:has(#app_package_upgrades_enabled:checked) .summary-js-package-upgrades .summary-off,
.app-form-row:has(#app_ruby_upgrade_enabled:checked) .summary-ruby-upgrades .summary-off,
.app-form-row:has(#app_board_processing_enabled:checked) .summary-board-processing .summary-off,
.app-form-row:has(#app_vulnerability_alerts_enabled:checked) .summary-vulnerability-alerts .summary-off {
  display: none;
}

.app-form-row:has(#app_board_processing_enabled:not(:checked)):has(#app_gem_upgrades_enabled:checked) .summary-note-unworked,
.app-form-row:has(#app_board_processing_enabled:not(:checked)):has(#app_package_upgrades_enabled:checked) .summary-note-unworked {
  display: block;
}

.app-form-row:has(#app_vulnerability_alerts_enabled:checked):has(#app_slack_alert_channel_id:placeholder-shown) .summary-note-slack {
  display: block;
}

.form-section {
  scroll-margin-top: calc(var(--navbar-height) + 1rem);
}

.settings-panel {
  display: none;
}

.switch-setting:has(> .form-switch > input[type="checkbox"]:checked) > .settings-panel,
.settings-panel.settings-open,
.settings-panel:has(:invalid) {
  display: block;
}
