/* DPX v0.8.7 desktop Settlement Conditions fit correction.
   The new Min Positive Peak to Arm row added one vertical control row.
   Keep the approved three-column 650px desktop frame unchanged and compact
   ONLY the middle Settlement Conditions column so all Kalman fields remain visible.
   Phone/tablet/laptop layouts and trading logic are untouched. */
@media (min-width: 1500px) and (min-height: 601px) {
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card label > span,
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-safe-checkbox > span,
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-radio-field > span {
    font-size: 14px !important;
    line-height: 1.08 !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .text-input,
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .select-input,
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .compact-select,
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card input[type="text"],
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card input[type="number"],
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card select {
    height: 36px !important;
    min-height: 36px !important;
    padding: 4px 9px !important;
    font-size: 15px !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-settlement-basics,
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-signal-grid {
    gap: 2px !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-settlement-basics > label,
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-shared-decline-row > label,
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-signal-grid > label {
    margin: 1px 0 !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-settlement-mode-group {
    gap: 2px !important;
    margin: 3px 0 4px !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-radio-field {
    min-height: 27px !important;
    gap: 8px !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-safe-checkbox {
    min-height: 30px !important;
    margin: 1px 0 !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-kalman-box {
    margin-top: 2px !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-kalman-params-row {
    gap: 3px 8px !important;
  }
}

/* v0.8.7 same-version placement correction requested from screenshot:
   on wide PC, place Positive Decline Protection in the unused right-side
   rectangle beside the two settlement radio choices. No logic changes. */
.m8-settlement-choice-row {
  display: contents;
}

@media (min-width: 1500px) and (min-height: 601px) {
  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-settlement-choice-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 255px !important;
    gap: 12px !important;
    align-items: center !important;
    margin: 3px 0 4px !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-settlement-choice-row > .m8-settlement-mode-group {
    margin: 0 !important;
    min-width: 0 !important;
  }

  html body#dpxRoot.desktop-tab-layout.desktop-tab-setup .m8-settlement-card .m8-settlement-choice-row > .v085-positive-decline-toggle {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 44px !important;
    margin: 0 !important;
    z-index: auto !important;
    grid-template-columns: minmax(0, 1fr) 30px !important;
    gap: 8px !important;
    align-self: center !important;
  }
}
