.agent-settings-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: #f7f8f7;
  border: 0;
  box-shadow: 0 28px 90px rgba(6, 30, 47, 0.38);
}

.agent-settings-dialog::backdrop {
  background: rgba(6, 29, 45, 0.72);
  backdrop-filter: blur(2px);
}

.agent-settings-dialog form > header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  color: white;
  background: var(--blue);
  border-bottom: 3px solid var(--gold);
}

.agent-settings-dialog form > header span,
.agent-settings-dialog form > header p {
  margin: 0;
  color: #b8cbd6;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-settings-dialog form > header h2 {
  margin: 3px 0;
  color: white;
  font-family: var(--font-display);
}

.agent-settings-dialog form > header button {
  color: white;
  font-size: 2rem;
  background: transparent;
  border: 0;
}

.agent-editor-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 18px 24px 0;
  list-style: none;
}

.agent-editor-steps li {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #85949f;
  font-size: 0.72rem;
}

.agent-editor-steps li::after {
  width: 100%;
  height: 1px;
  margin-left: 5px;
  content: '';
  background: #d6dfe3;
}

.agent-editor-steps li:last-child::after {
  display: none;
}

.agent-editor-steps span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #b9c7ce;
  border-radius: 50%;
}

.agent-editor-steps li.active {
  color: var(--blue);
  font-weight: 800;
}

.agent-editor-steps li.active span {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}

.agent-editor-body {
  padding: 24px;
}

.agent-settings-dialog form > footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: white;
  border-top: 1px solid #d8e0e4;
}

.agent-settings-dialog form > footer > div {
  display: flex;
  gap: 9px;
}

@media (max-width: 760px) {
  .agent-editor-steps li {
    font-size: 0;
  }

  .agent-settings-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .agent-editor-body,
  .agent-settings-dialog form > header,
  .agent-settings-dialog form > footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .agent-settings-dialog form > footer,
  .agent-settings-dialog form > footer > div {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}
