/* Kyajet 2.26.2 — layout refinements for setup rows and chart overlays */

/* Jetting action buttons */
.ky-setup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
}

.ky-setup-actions .btn {
  min-width: 0;
}

/* Setup rows back to full content width and centered */
#mixtureForm .setup-row-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

#mixtureForm fieldset {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr)) 48px;
  justify-content: center;
  gap: 10px;
}

#mixtureForm p.setuprowlabel {
  width: 100%;
  max-width: 100%;
}

#mixtureForm .setup-pilot,
#mixtureForm .setup-main,
#mixtureForm .setup-needle,
#mixtureForm .setup-clip,
#mixtureForm .setup-carb,
#mixtureForm .setup-action {
  width: 100%;
}

#mixtureForm .form-group.setup > .input-group {
  width: 100%;
}

#mixtureForm .setup-action {
  justify-self: center;
}

#mixtureForm .setup-action .btn,
#mixtureForm .setup-action .input-group {
  width: 48px;
}

/* Keep the first field visually aligned with the rest while preserving BS/V1-V3 badges. */
#mixtureForm .setup-pilot .input-group {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
}

#mixtureForm .setup-pilot .input-group > .form-control,
#mixtureForm .setup-pilot .input-group > .form-select {
  grid-column: 2;
  grid-row: 1;
}

#mixtureForm .setup-pilot .input-group > .input-group-text {
  grid-column: 1;
  grid-row: 1;
}

/* All input groups share the width of the widest field by occupying equal grid columns. */
#mixtureForm .setup-main .input-group,
#mixtureForm .setup-needle .input-group,
#mixtureForm .setup-clip .input-group,
#mixtureForm .setup-carb .input-group {
  width: 100%;
}

/* Center the "Richer/Leaner" overlays vertically within the upper/lower chart halves. */
#jetGraph.ky-chart .graphrich,
#mixtureGraph.ky-chart .graphrich,
#jetGraph.ky-chart .graphlean,
#mixtureGraph.ky-chart .graphlean {
  left: 40px;
  width: max-content;
  max-width: calc(100% - 80px);
  transform: translateY(-50%);
  line-height: 1;
  white-space: nowrap;
}

#jetGraph.ky-chart .graphrich,
#mixtureGraph.ky-chart .graphrich {
  top: 35%;
}

#jetGraph.ky-chart .graphlean,
#mixtureGraph.ky-chart .graphlean {
  top: 65%;
}

@media (max-width: 900px) {
  #mixtureForm fieldset {
    gap: 8px;
  }
}

@media (max-width: 679px) {
  .ky-setup-actions {
    justify-content: flex-start;
    gap: 10px;
  }

  #mixtureForm fieldset {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  #mixtureForm .setup-pilot .input-group {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
  }

  #jetGraph.ky-chart .graphrich,
  #mixtureGraph.ky-chart .graphrich,
  #jetGraph.ky-chart .graphlean,
  #mixtureGraph.ky-chart .graphlean {
    left: 28px;
    max-width: calc(100% - 48px);
  }

  #jetGraph.ky-chart .graphrich,
  #mixtureGraph.ky-chart .graphrich {
    top: 34%;
  }

  #jetGraph.ky-chart .graphlean,
  #mixtureGraph.ky-chart .graphlean {
    top: 66%;
  }
}
