/* Keep every Step 4 footer action on one line without overflowing the report. */
[data-ui="step4-report-footer-row"] {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.375rem !important;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

[data-ui="step4-prev-shell"] {
  flex: 0 0 auto;
  min-width: 0;
}

[data-ui="step4-report-actions"] {
  display: flex !important;
  flex: 1 1 0% !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  align-items: center;
  gap: 0.375rem !important;
  width: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

[data-ui="step4-report-actions"]::-webkit-scrollbar {
  display: none;
}

[data-ui="step4-report-actions"] > button {
  flex: 0 0 auto !important;
  min-width: 0;
  white-space: nowrap;
}

@media (min-width: 640px) and (max-width: 1024px) {
  [data-ui="step4-report-footer"] {
    padding-inline: 0.5rem !important;
  }

  [data-ui="step4-report-footer-row"],
  [data-ui="step4-report-actions"] {
    gap: 0.25rem !important;
  }

  [data-ui="step4-report-actions"] > button,
  [data-ui="step4-prev-button"] {
    height: 2.125rem !important;
    padding-inline: 0.375rem !important;
    font-size: 0.65rem !important;
    gap: 0.2rem !important;
  }

  [data-ui="step4-epc-amount"] {
    margin-inline-start: 0.25rem !important;
  }
}

@media (max-width: 767px) {
  [data-ui="step4-report-actions"] > button > span:not([data-ui^="step4-action-icon"]):not(.consult-engineer-mask) {
    display: none !important;
  }

  [data-ui="step4-report-actions"] > button,
  [data-ui="step4-prev-button"] {
    width: 2.125rem;
    padding-inline: 0 !important;
    justify-content: center;
  }
}
