.channels-section {
  display: grid;
  gap: var(--space-4);
}

.channel-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: start;
}

.channel-card {
  display: grid;
  gap: var(--space-3);
}

.channel-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: start;
}

.channel-card h2,
.channel-dialog h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

.channel-native pre {
  max-height: 18rem;
  overflow: auto;
}

.channel-drawer-form {
  display: grid;
  gap: var(--space-4);
}

.channel-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: start;
}

/* The form field pattern (console.css "Form field"); the drawer's grid gap spaces the fields. */
.channel-field {
  margin: 0;
}

.channel-field > label {
  display: block;
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-2);
}

.channel-field input,
.channel-field select {
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.channel-field > .hint {
  margin-top: var(--space-1);
  font-size: var(--text-md);
}

.channel-check {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-weight: var(--weight-semibold);
}

.channel-check input {
  width: auto;
}

.channel-field:has(input:disabled),
.channel-check:has(input:disabled) {
  opacity: 0.55;
}

.channel-field input:disabled,
.channel-check input:disabled {
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .channel-field input,
  .channel-field select {
    font-size: 16px;
  }

  .channel-heading,
  .channel-card-row {
    grid-template-columns: 1fr;
  }

  .channel-card-row {
    display: grid;
  }

  .channel-actions {
    justify-content: flex-start;
  }
}
