.paya-dialog:has(.performance-run-form) {
  inline-size: min(624px, calc(100vw - 32px)) !important;
  max-block-size: calc(100dvh - 40px) !important;
  overflow: hidden !important;
}

.paya-dialog:has(.performance-run-form) header span[id] {
  font-size: 1.375rem !important;
  font-weight: 600 !important;
  line-height: 1.35;
}

.performance-run-subtitle {
  display: block;
  margin-block-start: 4px;
  color: var(--paya-core-muted, var(--muted));
  font-size: .8125rem;
  font-weight: 400;
}

.paya-dialog:has(.performance-run-form) footer {
  background: var(--paya-core-secondary, var(--surface-secondary));
}

.performance-run-form {
  --run-control-height: 44px;
  display: grid;
  gap: 16px;
}

[data-ant-profile="industrial"] .performance-run-form {
  --run-control-height: 56px;
}

.performance-run-cohort {
  display: grid;
  gap: 8px;
  min-inline-size: 0;
  padding: 12px;
  border: 1px solid var(--paya-core-border, var(--border));
  border-radius: calc(var(--paya-core-control-radius, 8px) + 4px);
  background: var(--paya-core-secondary, var(--surface-secondary));
}

.performance-run-cohort-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
}

.performance-run-cohort-head label,
.performance-run-form legend {
  font-size: .9375rem;
  font-weight: 600;
}

.performance-run-count,
.performance-run-entry,
.performance-run-method {
  margin: 0;
  font-size: .8125rem;
}

.performance-run-count,
.performance-run-method {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--paya-core-accent, var(--accent));
}

.performance-run-count strong {
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

.performance-run-form textarea {
  min-inline-size: 0;
  max-inline-size: 100%;
  min-block-size: 108px;
  padding: 8px 10px;
}

.performance-run-entry {
  color: var(--paya-core-muted, var(--muted));
}

.performance-run-method {
  padding: 8px 10px;
  border-inline-start: 3px solid var(--paya-core-accent, var(--accent));
  border-radius: var(--paya-core-control-radius, 8px);
  background: color-mix(in srgb, var(--paya-core-accent, var(--accent)) 9%, transparent);
}

.performance-run-method .material-symbols-outlined {
  flex: none;
  font-size: 18px;
}

.performance-run-form fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.performance-run-form legend {
  margin-block-end: 8px;
  padding: 0;
}

.performance-run-period {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 8px 12px;
}

.performance-run-period > * {
  min-inline-size: 0;
  gap: 4px;
}

.performance-run-period :is(.rmdp-container, .paya-input-wrap, select) {
  block-size: var(--run-control-height) !important;
  min-block-size: var(--run-control-height) !important;
}

.performance-run-period [data-paya-message-empty="true"] {
  display: none;
}

@media (max-width: 480px) {
  .paya-dialog:has(.performance-run-form) {
    inline-size: calc(100vw - 20px) !important;
    max-block-size: calc(100dvh - 20px) !important;
  }

  .paya-dialog:has(.performance-run-form) header span[id] {
    font-size: 1.25rem !important;
  }

  .paya-dialog:has(.performance-run-form) :is(header, .professional-dialog-footer) {
    padding: 8px 16px !important;
  }

  .paya-dialog:has(.performance-run-form) div:has(> .performance-run-form) {
    padding: 12px 16px !important;
  }

  .performance-run-form { gap: 12px; }
  .performance-run-cohort { padding: 8px; }
  .performance-run-method { align-items: flex-start; }
  .performance-run-period { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .performance-run-period > :first-child { grid-column: 1 / -1; }
}
