.stepper-container {
  padding: 30px 30px 24px;
  background: linear-gradient(180deg, #fafcff 0, #ffffff 100%);
  border-bottom: 1px solid var(--border-colour);
}

#reportStepper {
  width: 100%;
}

.content-container {
  padding: 30px;
}

#stepContent {
  width: 100%;
  min-height: 430px;
}

.step-panel {
  width: 100%;
  padding: 2px 2px 20px;
}

.step-header {
  margin-bottom: 26px;
}

.step-header h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 650;
  line-height: 1.3;
}

.step-description {
  max-width: 760px;
  margin: 0;
  color: var(--secondary-text);
  font-size: 15px;
  line-height: 1.6;
}

.navigation-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 30px;
  background: #fafafa;
  border-top: 1px solid var(--border-colour);
}

.step-indicator {
  color: var(--secondary-text);
  font-size: 14px;
  font-weight: 600;
}

.navigation-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.required-note {
  margin: 20px 0 0;
  color: var(--secondary-text);
  font-size: 13px;
}

.required-marker {
  color: var(--error-colour);
  font-weight: 700;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.review-section {
  min-width: 0;
  padding: 20px;
  background: var(--subtle-background);
  border: 1px solid var(--border-colour);
  border-radius: 10px;
}

.review-section h3 {
  margin: 0 0 15px;
  color: var(--text-colour);
  font-size: 17px;
  font-weight: 650;
}

.review-row {
  display: grid;
  grid-template-columns:
    minmax(125px, 170px)
    minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #e4e4e4;
}

.review-row:last-child {
  border-bottom: 0;
}

.review-label {
  color: var(--secondary-text);
  font-size: 14px;
  font-weight: 600;
}

.review-value {
  min-width: 0;
  color: var(--text-colour);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.photo-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--border-colour);
  border-radius: 8px;
  color: var(--secondary-text);
  font-size: 14px;
}

.success-panel {
  display: none;
  padding: 30px;
  text-align: center;
}

.success-panel.is-visible {
  display: block;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 700;
}

.success-panel h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.success-panel p {
  margin: 0;
  color: var(--secondary-text);
  line-height: 1.6;
}

.success-reference {
  margin-top: 14px !important;
  color: var(--text-colour) !important;
  font-weight: 650;
}

/*
 * Normal success state.
 */
.success-panel.is-success .success-icon {
  background-color: #e6f7ed;
  color: #15803d;
}

/*
 * Partial success state: the report was saved,
 * but one or more photographs failed.
 */
.success-panel.is-warning .success-icon {
  background-color: #fff4ce;
  color: #8a6d00;
  font-size: 0;
}

.success-panel.is-warning .success-icon::before {
  content: "!";
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.success-panel.is-warning h2 {
  color: #6b5700;
}

.noscript-message {
  max-width: 1100px;
  margin: 20px auto;
  padding: 16px;
  background: #fff4ce;
  border: 1px solid #e6c94f;
  border-radius: 8px;
  color: #5c4b00;
}

.dx-form {
  width: 100%;
}

.dx-field-item {
  margin-bottom: 8px;
}

.dx-field-item-label-text {
  font-weight: 600;
}

.dx-texteditor {
  border-radius: 6px;
}

.dx-textarea textarea {
  line-height: 1.55;
}

.dx-radiogroup {
  padding-top: 5px;
}

.dx-radiobutton {
  margin-right: 20px;
}

.dx-fileuploader,
.dx-fileuploader-wrapper {
  padding-left: 0;
}

.dx-fileuploader-input-wrapper {
  border: 1px dashed #b6b6b6;
  border-radius: 8px;
}

.dx-button {
  border-radius: 6px;
}

.dx-button-mode-contained.dx-button-default {
  background-color: var(--primary-colour);
}

.dx-button-mode-contained.dx-button-default:hover {
  background-color: var(--primary-hover);
}

.dx-button-mode-contained.dx-button-success {
  background-color: var(--success-colour);
}

@media screen and (max-width: 800px) {
  body {
    padding: 20px 12px;
  }

  .stepper-container {
    padding: 24px 20px 20px;
  }

  .content-container {
    padding: 24px 20px;
  }

  .navigation-panel {
    padding: 20px;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 600px) {
  body {
    padding: 12px 8px;
  }

  .page-header {
    padding: 4px 4px 0;
  }

  .report-card {
    border-radius: 8px;
  }

  .stepper-container {
    padding: 20px 0px 16px;
    overflow-x: auto;
  }

  #reportStepper {
    min-width: 358px;
  }

  .content-container {
    padding: 22px 16px;
  }

  #stepContent {
    min-height: 500px;
  }

  .navigation-panel {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 16px;
  }

  .navigation-buttons {
    width: 100%;
  }

  #backButton,
  #nextButton {
    flex: 1;
  }

  #backButton .dx-button,
  #nextButton .dx-button {
    width: 100% !important;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
