html {
  font-size: 14px;
}

@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;
}

.jd-navbar {
  background-color: #166534;
  position: relative;
  z-index: 1080;
}

.jd-navbar .navbar-brand,
.jd-navbar .nav-link,
.jd-navbar .navbar-toggler {
  color: #fff;
}

.jd-navbar .nav-link:hover,
.jd-navbar .nav-link:focus,
.jd-navbar .navbar-brand:hover,
.jd-navbar .navbar-brand:focus {
  color: #d1fae5;
}

.jd-navbar .navbar-collapse {
  position: relative;
  z-index: 1080;
}

/* Keep Bootstrap gates above the custom navbar so modal headers and close buttons stay fully visible. */
.modal-backdrop {
  z-index: 1090;
}

.modal {
  z-index: 1100;
}

.modal-content {
  position: relative;
}

/* Floating helper for long acknowledgement gates. */
.modal-scroll-bottom-btn {
  position: absolute;
  right: 1.25rem;
  bottom: 4.75rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: 0 0.35rem 0.8rem rgba(0, 0, 0, 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;
}

.index-option-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.index-option-row:first-of-type {
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}

.index-option-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.index-option-price {
  white-space: nowrap;
}

.index-enabled-label {
  color: #166534;
  font-weight: 700;
}

.index-option-row .form-check-input:not(:disabled) {
  border-color: #166534;
  border-width: 2px;
  opacity: 1;
}

.index-option-row .form-check-input:not(:disabled):checked {
  background-color: #166534;
  border-color: #166534;
}

.index-option-row .form-check-input:not(:disabled):focus {
  border-color: #166534;
  box-shadow: 0 0 0 0.2rem rgba(22, 101, 52, 0.2);
}

.index-coming-soon-note {
  color: #7c3aed;
  font-style: italic;
}

.index-option-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

.index-option-inline .form-check {
  margin-right: 0.25rem;
  flex: 1 1 auto;
}

/* Keep option input controls aligned to the right edge immediately before the price. */
.index-option-inline > .index-inline-input,
.index-option-inline > .index-inline-select,
.index-option-inline > .index-inline-controls {
  margin-left: auto;
}

/* Give the long Lost ECU label and ECU SN textbox separate columns before the price. */
.index-option-lost {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem;
  column-gap: 0.75rem;
  align-items: center;
}

/* The Lost ECU grid owns its spacing, so the textbox should stay in the second grid column. */
.index-option-lost > .index-inline-input {
  margin-left: 0;
}

.index-inline-input {
  width: 10rem;
  background-color: var(--bs-body-bg);
}

/* Shrink the inline hours placeholder text so longer controller labels fit inside the existing textbox width. */
.index-inline-input::placeholder {
  font-size: 0.7rem;
}

/* Hide the placeholder while the user is actively editing the inline hours fields. */
.index-inline-input:focus::placeholder {
  color: transparent;
}

/* Keep both inline hours inputs on the same background when the browser fills a suggested/autofill value. */
.index-inline-input:-webkit-autofill,
.index-inline-input:-webkit-autofill:hover,
.index-inline-input:-webkit-autofill:focus,
.index-inline-input:-webkit-autofill:active {
  background-color: var(--bs-body-bg);
  -webkit-text-fill-color: var(--bs-body-color);
  -webkit-box-shadow: 0 0 0 1000px var(--bs-body-bg) inset;
  box-shadow: 0 0 0 1000px var(--bs-body-bg) inset;
  transition: background-color 9999s ease-in-out 0s;
}

.index-inline-select {
  width: 10rem;
}

.pro-editor-card .card-body {
  display: flex;
  flex-direction: column;
}

.pro-page {
  position: relative;
  min-height: calc(100vh - 12rem);
}

.pro-loading-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(2px);
  z-index: 20;
}

.pro-loading-overlay.show {
  display: flex;
}

.pro-layout-row {
  min-height: 0;
}

.pro-editor {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  height: 100%;
  min-height: calc(100vh - 15rem);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  background-color: var(--bs-body-bg);
}

.pro-editor-toggle {
  line-height: 1;
  min-width: 2rem;
  padding-inline: 0.5rem;
}

.pro-editor-toggle-icon {
  display: inline-block;
  font-size: 1rem;
}

.pro-editor-toolbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
}

.pro-editor-history-btn:disabled {
  opacity: 0.65;
}

.pro-editor-status-success {
  color: #198754;
}

.pro-editor-status-error {
  color: #dc3545;
}

.pro-editor-status-info {
  color: #0d6efd;
}

/* Match the Fix Header Sizes button to the navbar green before header-size-relevant edits occur. */
.pro-fix-header-sizes-btn {
  color: #166534;
  border-color: #166534;
}

/* Keep the default hover state aligned with the navbar green styling. */
.pro-fix-header-sizes-btn:hover,
.pro-fix-header-sizes-btn:focus,
.pro-fix-header-sizes-btn:active {
  color: #fff;
  background-color: #166534;
  border-color: #166534;
}

/* Use a red warning state after inserts or deletes indicate header sizes may need fixing. */
.pro-fix-header-sizes-btn.pro-fix-header-sizes-btn-alert {
  color: #dc3545;
  border-color: #dc3545;
}

/* Preserve the red warning treatment while the user hovers or focuses the alert state. */
.pro-fix-header-sizes-btn.pro-fix-header-sizes-btn-alert:hover,
.pro-fix-header-sizes-btn.pro-fix-header-sizes-btn-alert:focus,
.pro-fix-header-sizes-btn.pro-fix-header-sizes-btn-alert:active {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

.pro-free-trial-label {
  color: #7c3aed;
  font-weight: 700;
}

.pro-layout-row.pro-editor-maximized {
  --bs-gutter-x: 0;
}

@media (max-width: 767.98px) {
  .index-option-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .jd-navbar .navbar-collapse {
    background-color: #166534;
  }

  .index-option-price {
    margin-left: 1.5rem;
  }

  .index-inline-input,
  .index-inline-select {
    width: 100%;
  }

  .pro-page {
    min-height: auto;
  }

  .pro-editor {
    min-height: 32rem;
  }

}