/* Protection stage: compact penalty controls and calmer termination cards. */
.builder #builder-stage-protection .field-cluster:has(#latePaymentRuleField) {
  grid-template-columns:
    minmax(260px, 1fr)
    minmax(82px, 96px)
    minmax(82px, 96px)
    minmax(82px, 96px) !important;
}

.builder #builder-stage-protection .field-cluster:has(#lateReturnRuleField) {
  grid-template-columns:
    minmax(260px, 1fr)
    minmax(82px, 96px)
    minmax(82px, 96px) !important;
}

.builder #builder-stage-protection .field-cluster:has(#latePaymentRuleField) .field-cluster__header,
.builder #builder-stage-protection .field-cluster:has(#lateReturnRuleField) .field-cluster__header {
  grid-column: 1 / -1;
}

.builder #builder-stage-protection #latePaymentRuleField,
.builder #builder-stage-protection #lateReturnRuleField {
  grid-column: 1 / 2 !important;
}

.builder #builder-stage-protection #latePaymentGraceField {
  grid-column: 2 / 3 !important;
}

.builder #builder-stage-protection #latePaymentPenaltyField {
  grid-column: 3 / 4 !important;
}

.builder #builder-stage-protection #lateReturnPenaltyField {
  grid-column: 2 / 3 !important;
}

.builder #builder-stage-protection #latePaymentPenaltyCapField {
  grid-column: 4 / 5 !important;
}

.builder #builder-stage-protection #lateReturnPenaltyCapField {
  grid-column: 3 / 4 !important;
}

.builder #builder-stage-protection #latePaymentFineField {
  grid-column: 2 / 5 !important;
}

.builder #builder-stage-protection #lateReturnFineField {
  grid-column: 2 / 4 !important;
}

.builder #builder-stage-protection .field--fit-day input,
.builder #builder-stage-protection .field--fit-percent input {
  text-align: center;
}

.builder #builder-stage-protection .check-grid--termination .check-card {
  background: rgba(255, 253, 248, 0.92) !important;
  border-color: rgba(24, 55, 44, 0.12) !important;
  box-shadow: none !important;
}

.builder #builder-stage-protection .check-grid--termination .check-card:has(input:checked),
.builder #builder-stage-protection .check-grid--termination .check-card.builder-focus {
  background: rgba(255, 253, 248, 0.92) !important;
  border-color: rgba(24, 55, 44, 0.12) !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .builder #builder-stage-protection .field-cluster:has(#latePaymentRuleField),
  .builder #builder-stage-protection .field-cluster:has(#lateReturnRuleField) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .builder #builder-stage-protection #latePaymentRuleField,
  .builder #builder-stage-protection #latePaymentGraceField,
  .builder #builder-stage-protection #latePaymentPenaltyField,
  .builder #builder-stage-protection #latePaymentPenaltyCapField,
  .builder #builder-stage-protection #latePaymentFineField,
  .builder #builder-stage-protection #lateReturnRuleField,
  .builder #builder-stage-protection #lateReturnPenaltyField,
  .builder #builder-stage-protection #lateReturnPenaltyCapField,
  .builder #builder-stage-protection #lateReturnFineField {
    grid-column: 1 / -1 !important;
  }
}
