.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.automation-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--c-surface, #f8f9fa);
  border: 1px solid var(--c-border, #dee2e6);
  border-radius: 6px;

  &__fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  &__type {
    max-width: 280px;
  }

  &__config {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    .form-control {
      min-width: 200px;
      max-width: 300px;
    }
  }

  &__remove {
    flex-shrink: 0;
    margin-top: 2px;
    line-height: 1;
    font-size: 16px;
    padding: 2px 8px;
  }
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;

  input[type="checkbox"] {
    margin: 0;
  }
}

.automation-actions-cell {
  white-space: nowrap;
}

.automation-inline-form {
  display: inline;
}

.automation-history-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  align-items: end;

  .form-field {
    margin: 0;
  }

  .field-label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .form-control {
    min-height: 34px;
  }

  &__actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 1px;
  }
}
