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;
  color: #1f1f1f;
  font-family: "Segoe UI Variable Text", "Segoe UI", "Inter", Roboto, Arial, sans-serif;
  font-weight: 450;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: auto;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
}

h1, h2, h3, h4, h5, h6 {
  color: #181818;
  font-weight: 550;
}

/* Keep the readonly file-name textbox visually aligned with the choose-file button. */
#uploadFileNameDisplay[readonly] {
  background-color: var(--bs-body-bg);
}

.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;
}

/* Caterpillar-style yellow navigation bar. */
.jd-navbar {
  background-color: #FFCD11;
  position: relative;
  z-index: 1080;
}

.jd-navbar .navbar-brand,
.jd-navbar .nav-link,
.jd-navbar .navbar-toggler {
  color: #202020;
  font-weight: 500;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: auto;
}

.jd-navbar .nav-link:hover,
.jd-navbar .nav-link:focus,
.jd-navbar .navbar-brand:hover,
.jd-navbar .navbar-brand:focus {
  color: #000;
}

.jd-navbar .navbar-collapse {
  position: relative;
  z-index: 1080;
}

/* Modification option rows, mirrored from the BinWebApp Index styling. */
.index-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem;
  align-items: flex-start;
  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 {
  display: block;
  width: 4rem;
  white-space: nowrap;
  text-align: right;
}

.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: grid;
  grid-template-columns: 11rem minmax(16.75rem, 1fr);
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.index-option-inline .form-check {
  min-width: 0;
}

/* Keep every textbox column in the same fixed location regardless of radio state. */
.index-option-inline > .index-textbox-column {
  justify-self: start;
}

/* Stack the modification textboxes vertically, right-aligned next to the price. */
.index-textbox-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* A single textbox row rendered as fixed columns: label | input | unit.
   This prevents horizontal shifting when labels/units are empty. */
.index-textbox-field {
  display: grid;
  grid-template-columns: 4.5rem 12rem 1.75rem;
  align-items: center;
  column-gap: 0.5rem;
  width: max-content;
}

/* Per-textbox caption column (e.g. "Main", "Idle", "Mileage"). */
.index-textbox-label {
  margin-bottom: 0;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

/* Empty label placeholder keeps the label column width reserved. */
.index-textbox-label-empty {
  visibility: hidden;
}

/* Unit suffix column (e.g. "hr", "km"); fixed width keeps inputs aligned. */
.index-textbox-unit {
  width: 1.75rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

/* Empty unit placeholder keeps the unit column width reserved. */
.index-textbox-unit-empty {
  visibility: hidden;
}

.index-inline-input {
  width: 12rem;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-weight: 400;
}

.index-inline-input:disabled {
  color: var(--bs-body-color);
  -webkit-text-fill-color: var(--bs-body-color);
  opacity: 1;
}

input[type="text"].form-control {
  font-size: 18px;
}

/* Keep placeholder text size consistent with entered text in both Hours and VIN boxes. */
.index-inline-input::placeholder {
  font-size: 18px;
  font-weight: 400;
  color: var(--bs-secondary-color);
  opacity: 1;
}

/* Hide the placeholder while the user is actively editing the inline field. */
.index-inline-input:focus::placeholder {
  color: transparent;
}

.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;
}

.supported-device-image {
  width: min(100%, 28rem);
  max-height: 22rem;
  object-fit: contain;
}

@media (max-width: 767.98px) {
  .index-option-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .jd-navbar .navbar-collapse {
    background-color: #FFCD11;
  }

  .index-option-price {
    margin-left: 1.5rem;
    width: auto;
    text-align: left;
  }

  .index-option-inline {
    grid-template-columns: 1fr;
  }

  .index-textbox-column {
    width: 100%;
    align-items: stretch;
  }

  .index-textbox-field {
    width: 100%;
    grid-template-columns: minmax(4.5rem, auto) 1fr 1.75rem;
  }

  .index-inline-input {
    width: 100%;
  }

  .pro-page {
    min-height: auto;
  }
}