#vgg-automation {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.vgg-automation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vgg-automation-list > :only-child {
  grid-column: 1 / -1;
}

.vgg-automation-title {
  min-width: 0;
}

.vgg-automation-card-header h2,
.vgg-automation-details dd {
  overflow-wrap: anywhere;
}

.vgg-automation-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.vgg-automation-details > div {
  min-width: 0;
  padding: 11px 12px;
  background: var(--soft);
  border-radius: var(--r-sm);
}

.vgg-automation-details > :last-child {
  grid-column: 1 / -1;
}

.vgg-automation-details dt {
  color: var(--muted);
  font-size: 12px;
}

.vgg-automation-details dd {
  margin: 3px 0 0;
  white-space: pre-wrap;
}

.vgg-automation-dialog {
  width: min(100% - 32px, 550px);
  margin: auto;
}

.vgg-automation-editor {
  max-height: calc(100dvh - 80px);
}

.vgg-automation-editor-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px;
}

.vgg-automation-editor textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.vgg-automation-editor textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .vgg-automation-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 450px) {
  .vgg-automation-details,
  .vgg-automation-editor-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .vgg-automation-dialog {
    padding: 18px;
  }

  .vgg-automation-editor {
    max-height: calc(100dvh - 68px);
  }
}
